X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fdecode_binobj.cxx;h=41880e1257a80c839a43911207835c47a4f0ff3a;hb=adb7db9229db1d869b254ac18f1471bed464c508;hp=dbb1e1db7af0e3c60a8b4e9f7ec9518614556eca;hpb=d778dd081d109c9e2430a945f01ed25ca846fdb7;p=simgear.git diff --git a/simgear/io/decode_binobj.cxx b/simgear/io/decode_binobj.cxx index dbb1e1db..41880e12 100644 --- a/simgear/io/decode_binobj.cxx +++ b/simgear/io/decode_binobj.cxx @@ -1,14 +1,22 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include +#ifndef _WIN32 #include -#include STL_IOSTREAM - -#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) -SG_USING_STD(cout); -SG_USING_STD(endl); #endif +#include +#include +#include + #include "sg_binobj.hxx" +#include + +using std::cout; +using std::endl; int main( int argc, char **argv ) { @@ -18,6 +26,9 @@ int main( int argc, char **argv ) { if ( argc != 2 ) { cout << "Usage: " << argv[0] << " binary_obj_file" << endl; } + + + sglog().setLogLevels( SG_ALL, SG_ALERT ); SGBinObject obj; bool result = obj.read_bin( argv[1] ); @@ -35,14 +46,14 @@ int main( int argc, char **argv ) { obj.get_gbs_radius()); cout << endl; - point_list nodes = obj.get_wgs84_nodes(); + std::vector nodes = obj.get_wgs84_nodes(); cout << "# vertex list" << endl; for ( i = 0; i < (int)nodes.size(); ++i ) { printf("v %.5f %.5f %.5f\n", nodes[i].x(), nodes[i].y(), nodes[i].z() ); } cout << endl; - point_list normals = obj.get_normals(); + std::vector normals = obj.get_normals(); cout << "# vertex normal list" << endl; for ( i = 0; i < (int)normals.size(); ++i ) { printf("vn %.5f %.5f %.5f\n", @@ -50,7 +61,7 @@ int main( int argc, char **argv ) { } cout << endl; - point_list texcoords = obj.get_texcoords(); + std::vector texcoords = obj.get_texcoords(); cout << "# texture coordinate list" << endl; for ( i = 0; i < (int)texcoords.size(); ++i ) { printf("vt %.5f %.5f\n", @@ -61,7 +72,7 @@ int main( int argc, char **argv ) { cout << "# geometry groups" << endl; cout << endl; - string material; + std::string material; int_list vertex_index; int_list normal_index; int_list tex_index;