From 2754d4697d745cf6384dd52032efe7c67892022e Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Tue, 11 Apr 2006 09:48:04 +0000 Subject: [PATCH] changes needed for compilation on linux 64b with gcc 3.4.5 --- wrap/io_trimesh/import_obj.h | 14 +++++++++----- wrap/ply/plystuff.h | 19 +++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/wrap/io_trimesh/import_obj.h b/wrap/io_trimesh/import_obj.h index cebad8d1..e8357d53 100644 --- a/wrap/io_trimesh/import_obj.h +++ b/wrap/io_trimesh/import_obj.h @@ -25,6 +25,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2006/03/29 09:27:07 cignoni +Added managemnt of non critical errors + Revision 1.3 2006/03/29 08:51:16 corsini reset to zero warnings @@ -693,12 +696,13 @@ static int Open( OpenMeshType &m, const char * filename, Info &oi) (*fi).C()[3] = faceColor[3]; } + /* // A face polygon composed of more than three vertices is triangulated // according to the following schema: // v5 - // / \ - // / \ - // / \ + // / \ + // / \ + // / \ // v1------v4 // |\ / // | \ / @@ -709,7 +713,7 @@ static int Open( OpenMeshType &m, const char * filename, Info &oi) // has been split into the triangles (v1,v2,v3), (v1,v3,v4) e (v1,v4,v5). // This way vertex v1 becomes the common vertex of all newly generated // triangles, and this may lead to the creation of very thin triangles. - + */ ++fi; ++numTriangles; @@ -1176,4 +1180,4 @@ static bool LoadMask(const char * filename, int &mask) } // end Namespace io } // end Namespace vcg -#endif // ndef __VCGLIB_IMPORT_OBJ \ No newline at end of file +#endif // ndef __VCGLIB_IMPORT_OBJ diff --git a/wrap/ply/plystuff.h b/wrap/ply/plystuff.h index 3aba8d21..cca76fcd 100644 --- a/wrap/ply/plystuff.h +++ b/wrap/ply/plystuff.h @@ -31,6 +31,9 @@ of Greg Turk and on the work of Claudio Rocchini History $Log: not supported by cvs2svn $ +Revision 1.4 2005/12/02 00:00:53 cignoni +Moved and corrected interpret_texture_name from plystuff.h to plylib.cpp + Revision 1.3 2005/03/18 00:14:40 cignoni removed small gcc compiling issues @@ -48,7 +51,9 @@ Cleaning of the automatic bbox caching support for ply files. First working vers #include #include #include +#ifdef WIN32 #include +#endif #include #include @@ -69,6 +74,8 @@ using namespace vcg; #define pb_fstat fstat #define pb_open open #define pb_close close +#define _O_BINARY 0 // Does not exist on Unix +#define _O_RDONLY O_RDONLY #endif @@ -256,9 +263,9 @@ bool ScanBBox( const char * fname, Box3d & box, bool use_cache=true ) static const PropDescriptor pv[3]= { - {"vertex","x",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,x),0,0,0,0,0}, - {"vertex","y",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,y),0,0,0,0,0}, - {"vertex","z",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,z),0,0,0,0,0}, + {"vertex","x",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,x),0,0,0,0,0 ,0}, // TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) + {"vertex","y",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,y),0,0,0,0,0 ,0}, // TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) + {"vertex","z",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,z),0,0,0,0,0, 0},// TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) }; @@ -321,9 +328,9 @@ bool ScanBBox( const char * fname, Box3d & box, const Matrix44d & m, bool use_ca static const PropDescriptor pv[3]= { - {"vertex","x",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,x),0,0,0,0,0}, - {"vertex","y",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,y),0,0,0,0,0}, - {"vertex","z",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,z),0,0,0,0,0}, + {"vertex","x",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,x),0,0,0,0,0, 0},// TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) + {"vertex","y",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,y),0,0,0,0,0, 0},// TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) + {"vertex","z",T_FLOAT,T_DOUBLE,offsetof(PlyPoint3d,z),0,0,0,0,0, 0},// TO GET RID OF COMPILER WARNING I ADDED 0 TO INITIALIZE format (MV) };