removed small gcc compiling issues

This commit is contained in:
Paolo Cignoni 2005-03-18 00:14:40 +00:00
parent b4b7f45041
commit 4c1f6e73b6
3 changed files with 16 additions and 4 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.23 2005/03/15 11:40:56 cignoni
Added operator*=( std::vector<PointType> ...) to apply a matrix to a vector of vertexes (replacement of the old style mesh.Apply(tr).
Revision 1.22 2004/12/15 18:45:50 tommyfranken Revision 1.22 2004/12/15 18:45:50 tommyfranken
*** empty log message *** *** empty log message ***
@ -386,7 +389,7 @@ template <class T> void Matrix44<T>::operator*=( const Matrix44 & m ) {
} }
template < class PointType , class T > void operator*=( std::vector<PointType> &vert, const Matrix44<T> & m ) { template < class PointType , class T > void operator*=( std::vector<PointType> &vert, const Matrix44<T> & m ) {
std::vector<PointType>::iterator ii; typename std::vector<PointType>::iterator ii;
for(ii=vert.begin();ii!=vert.end();++ii) for(ii=vert.begin();ii!=vert.end();++ii)
(*ii).P()=m * (*ii).P(); (*ii).P()=m * (*ii).P();
} }

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.12 2005/02/08 17:28:22 tarini
changed 120 "const static" to "static const", and added missing "format" fields to all PropDescriptor literals, to keep Mingw compiler happy
Revision 1.11 2005/01/03 10:35:47 cignoni Revision 1.11 2005/01/03 10:35:47 cignoni
Improved the compatibility for ply format for faces having the list size (e.g. number of vertexes of a face) as a char instead of a uchar. Improved the compatibility for ply format for faces having the list size (e.g. number of vertexes of a face) as a char instead of a uchar.
Added a couple of new face descriptors, corrected a bug in error reporting function (and restructured) and translated a few comments. Added a couple of new face descriptors, corrected a bug in error reporting function (and restructured) and translated a few comments.
@ -69,6 +72,7 @@ Initial commit
#include<wrap/ply/io_mask.h> #include<wrap/ply/io_mask.h>
#include<wrap/io_trimesh/io_ply.h> #include<wrap/io_trimesh/io_ply.h>
#include<vcg/complex/trimesh/allocate.h> #include<vcg/complex/trimesh/allocate.h>
#include<vcg/space/color4.h>
#include <vector> #include <vector>
namespace vcg { namespace vcg {

View File

@ -31,6 +31,9 @@ of Greg Turk and on the work of Claudio Rocchini
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.2 2005/03/15 11:46:52 cignoni
Cleaning of the automatic bbox caching support for ply files. First working version.
*/ */
@ -43,22 +46,24 @@ $Log: not supported by cvs2svn $
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <io.h> #include <io.h>
#include <direct.h>
#include <vcg/space/box3.h> #include <vcg/space/box3.h>
#include <wrap/ply/plylib.h> #include <wrap/ply/plylib.h>
using namespace vcg; using namespace vcg;
#ifdef WIN32 #ifdef WIN32
#include <direct.h>
#define pb_mkdir(n) _mkdir(n) #define pb_mkdir(n) _mkdir(n)
#define pb_access _access #define pb_access _access
#define pb_stat _stat #define pb_stat _stat
#define pb_fstat _fstat
#define pb_open _open #define pb_open _open
#define pb_close _close #define pb_close _close
#else #else
#define pb_mkdir(n) mkdir(n,0) #define pb_mkdir(n) mkdir(n,0)
#define pb_access access #define pb_access access
#define pb_stat stat #define pb_stat stat
#define pb_fstat fstat
#define pb_open open #define pb_open open
#define pb_close close #define pb_close close
#endif #endif
@ -118,14 +123,14 @@ bool CheckCacheTime( const char * fname, const char * cname )
h = pb_open(fname,_O_BINARY|_O_RDONLY); h = pb_open(fname,_O_BINARY|_O_RDONLY);
if(h==0) return false; if(h==0) return false;
r = _fstat(h,&st); r = pb_fstat(h,&st);
pb_close(h); pb_close(h);
if(r==-1) return false; if(r==-1) return false;
ft = st.st_mtime; ft = st.st_mtime;
h = pb_open(cname,_O_BINARY|_O_RDONLY); h = pb_open(cname,_O_BINARY|_O_RDONLY);
if(h==0) return false; if(h==0) return false;
r = _fstat(h,&st); r = pb_fstat(h,&st);
//_read(h,&box,sizeof(box)); //_read(h,&box,sizeof(box));
pb_close(h); pb_close(h);
if(r==-1) return false; if(r==-1) return false;