minor changes to comply gcc compiler

This commit is contained in:
Paolo Cignoni 2005-03-18 16:35:53 +00:00
parent f8fb041641
commit eda550ba49
5 changed files with 37 additions and 56 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.26 2005/03/11 14:14:14 ganovelli
_ffi was a 4 for positions vector (only 3 used)
Revision 1.25 2005/01/28 17:53:13 pietroni
added HasEdgePlane function
@ -165,7 +168,7 @@ public:
/** Return the pointer to the j-th vertex of the face.
@param j Index of the face vertex.
*/
inline FVTYPE * & V( const int j )
inline VertexType * & V( const int j )
{
assert( (_flags & DELETED) == 0 );
assert( (_flags & NOTREAD) == 0 );
@ -175,7 +178,7 @@ public:
return v[j];
}
inline FVTYPE * const & V( const int j ) const
inline VertexType * const & V( const int j ) const
{
assert( (_flags & DELETED) == 0 );
assert( (_flags & NOTREAD) == 0 );
@ -183,7 +186,7 @@ public:
assert(j<3);
return v[j];
}
inline FVTYPE * const cV( const int j ) const
inline VertexType * const cV( const int j ) const
{
assert( (_flags & DELETED) == 0 );
assert( (_flags & NOTREAD) == 0 );
@ -223,15 +226,15 @@ public:
/** Return the pointer to the ((j+1)%3)-th vertex of the face.
@param j Index of the face vertex.
*/
inline FVTYPE * & V0( const int j ) { return V(j);}
inline FVTYPE * & V1( const int j ) { return V((j+1)%3);}
inline FVTYPE * & V2( const int j ) { return V((j+2)%3);}
inline const FVTYPE * const & V0( const int j ) const { return V(j);}
inline const FVTYPE * const & V1( const int j ) const { return V((j+1)%3);}
inline const FVTYPE * const & V2( const int j ) const { return V((j+2)%3);}
inline const FVTYPE * const & cV0( const int j ) const { return cV(j);}
inline const FVTYPE * const & cV1( const int j ) const { return cV((j+1)%3);}
inline const FVTYPE * const & cV2( const int j ) const { return cV((j+2)%3);}
inline VertexType * & V0( const int j ) { return V(j);}
inline VertexType * & V1( const int j ) { return V((j+1)%3);}
inline VertexType * & V2( const int j ) { return V((j+2)%3);}
inline const VertexType * const & V0( const int j ) const { return V(j);}
inline const VertexType * const & V1( const int j ) const { return V((j+1)%3);}
inline const VertexType * const & V2( const int j ) const { return V((j+2)%3);}
inline const VertexType * const & cV0( const int j ) const { return cV(j);}
inline const VertexType * const & cV1( const int j ) const { return cV((j+1)%3);}
inline const VertexType * const & cV2( const int j ) const { return cV((j+2)%3);}
/// Shortcut per accedere ai punti delle facce
inline CoordType & P0( const int j ) { return V(j)->P();}
@ -244,14 +247,14 @@ public:
inline const CoordType & cP1( const int j ) const { return cV((j+1)%3)->P();}
inline const CoordType & cP2( const int j ) const { return cV((j+2)%3)->P();}
inline FVTYPE * & UberV( const int j )
inline VertexType * & UberV( const int j )
{
assert(j>=0);
assert(j<3);
return v[j];
}
inline const FVTYPE * const & UberV( const int j ) const
inline const VertexType * const & UberV( const int j ) const
{
assert(j>=0);
assert(j<3);
@ -1198,40 +1201,6 @@ inline void Nexts( BaseFaceType *&f,int &z )
f = (*f).F(t);
}
/** This function change the orientation of the face. Inverting the index of two vertex
@param z Index of the edge
*/
void Swap ( const int z )
{
int i;
BaseFaceType *tmp, *prec;
int t, precz;
swap ( V((z )%3),V((z+1)%3));
if( OBJ_TYPE & (OBJ_TYPE_A|OBJ_TYPE_S ) )
{
swap ( F((z+1)%3),F((z+2)%3));
swap ( Z((z+1)%3),Z((z+2)%3));
for(i = 1; i < 3; i++)
{
tmp = this;
t = (z+i)%3;
do {
prec = tmp;
precz = t;
Nexts(tmp,t);
}
while (tmp != this);
(*prec).Z(precz) = (z+i)%3;
}
}
}
// Sezione dist e ray
#ifdef __VCGLIB_FACE_RT
CoordType edge[3];
@ -1239,7 +1208,7 @@ void Swap ( const int z )
#endif
/// return the index [0..2] of a vertex in a face
inline int VertexIndex( const FVTYPE * w ) const
inline int VertexIndex( const VertexType * w ) const
{
if( v[0]==w ) return 0;
else if( v[1]==w ) return 1;

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.15 2004/10/22 13:41:06 fiorin
Added CheckFlipEdge and FlipEdge
Revision 1.14 2004/10/18 17:15:45 ganovelli
minor change
@ -137,13 +140,13 @@ if(FaceType::HasFFAdjacency())
template <class FaceType>
void Detach(FaceType & f, const int e)
{
assert(!IsBorder(e));
assert(!IsBorder<FaceType>(e));
Pos< FaceType > EPB(&f,e); // la faccia dall'altra parte
EPB.NextF();
int cnt=0;
while ( EPB.f->FFp(EPB.z) != &f)
{
assert(!IsManifold(e)); // Si entra in questo loop solo se siamo in una situazione non manifold.
assert(!IsManifold<FaceType>(e)); // Si entra in questo loop solo se siamo in una situazione non manifold.
assert(!EPB.f->IsBorder(EPB.z));
EPB.NextF();
cnt++;
@ -366,7 +369,7 @@ void VFDetach(FaceType & f, int z)
template <class FaceType>
void VFAppend(FaceType* & f, int z)
{
FaceType::VertexType *v=f->V(z);
typename FaceType::VerteType *v = f->V(z);
if (v->VFp()!=0)
{
FaceType *f0=v->VFp();

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.6 2004/10/09 13:48:02 ponchio
Fixed bug in init.
Revision 1.5 2004/05/10 13:15:54 cignoni
missing ending newline
@ -154,7 +157,7 @@ template<class T> T Distance(const Plane3<T> &plane, const Point3<T> &point) {
}
///Distance point-plane (Move this function to somewhere else)
template<class T> T Distance(const Point3<T> &po, const Plane3<T> &plane) {
template<class T> T Distance(const Point3<T> &point, const Plane3<T> &plane) {
return plane.Direction() * point - plane.Offset;
}

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.5 2004/05/10 13:22:25 cignoni
small syntax error Math -> math in Angle
Revision 1.4 2004/04/05 11:57:32 cignoni
Add V() access function
@ -274,7 +277,7 @@ public:
template <class T>
inline void Import( const Point2<T> & b )
{
_v[0] = p.X(); _v[1] = p.Y();
_v[0] = b.X(); _v[1] = b.Y();
}
/// constructs a 2D points from an existing one of different type
template <class T>
@ -288,7 +291,7 @@ public:
template <class T>
inline T Angle( Point2<T> const & p1, Point2<T> const & p2 )
inline T Angle( Point2<T> const & p0, Point2<T> const & p1 )
{
return p1.Angle() - p0.Angle();
}

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.9 2005/01/21 18:02:11 ponchio
Removed dependence from matrix44 and changed VectProd
Revision 1.8 2005/01/12 11:25:02 ganovelli
added Dimension
@ -60,7 +63,7 @@ namespace vcg {
template <class T> class Point4
{
protected:
public:
/// The only data member. Hidden to user.
T _v[4];