X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fdecode_binobj.cxx;h=41880e1257a80c839a43911207835c47a4f0ff3a;hb=201cb61f842ef50a19438e3872ba22e588fa1afc;hp=70a50f5ea2bef5814e151eaaaa6cd54289df02a9;hpb=78411d29a7fdd606e50a81d03d6e8a08dcb15828;p=simgear.git diff --git a/simgear/io/decode_binobj.cxx b/simgear/io/decode_binobj.cxx index 70a50f5e..41880e12 100644 --- a/simgear/io/decode_binobj.cxx +++ b/simgear/io/decode_binobj.cxx @@ -1,12 +1,22 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include +#ifndef _WIN32 #include -#include STL_IOSTREAM +#endif + +#include +#include +#include #include "sg_binobj.hxx" +#include -SG_USING_STD(cout); -SG_USING_STD(endl); +using std::cout; +using std::endl; int main( int argc, char **argv ) { @@ -16,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] ); @@ -33,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", @@ -48,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", @@ -59,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;