diff --git a/vcg/complex/tetramesh/update/topology.h b/vcg/complex/tetramesh/update/topology.h index 9f164d80..f35f84ab 100644 --- a/vcg/complex/tetramesh/update/topology.h +++ b/vcg/complex/tetramesh/update/topology.h @@ -314,27 +314,27 @@ void TTTopology(VertexContainer &vert,TetraContainer &tetra) (*ti).T(2)=(&(*ti)); (*ti).T(3)=(&(*ti)); - v0=(*ti).V(Tetra4::VofF(0,0)); - v1=(*ti).V(Tetra4::VofF(0,1)); - v2=(*ti).V(Tetra4::VofF(0,2)); + v0=(*ti).V(Tetra3::VofF(0,0)); + v1=(*ti).V(Tetra3::VofF(0,1)); + v2=(*ti).V(Tetra3::VofF(0,2)); VF.push_back(Facet(v0,v1,v2,&(*ti),0)); - v0=(*ti).V(Tetra4::VofF(1,0)); - v1=(*ti).V(Tetra4::VofF(1,1)); - v2=(*ti).V(Tetra4::VofF(1,2)); + v0=(*ti).V(Tetra3::VofF(1,0)); + v1=(*ti).V(Tetra3::VofF(1,1)); + v2=(*ti).V(Tetra3::VofF(1,2)); VF.push_back(Facet(v0,v1,v2,&(*ti),1)); - v0=(*ti).V(Tetra4::VofF(2,0)); - v1=(*ti).V(Tetra4::VofF(2,1)); - v2=(*ti).V(Tetra4::VofF(2,2)); + v0=(*ti).V(Tetra3::VofF(2,0)); + v1=(*ti).V(Tetra3::VofF(2,1)); + v2=(*ti).V(Tetra3::VofF(2,2)); VF.push_back(Facet(v0,v1,v2,&(*ti),2)); - v0=(*ti).V(Tetra4::VofF(3,0)); - v1=(*ti).V(Tetra4::VofF(3,1)); - v2=(*ti).V(Tetra4::VofF(3,2)); + v0=(*ti).V(Tetra3::VofF(3,0)); + v1=(*ti).V(Tetra3::VofF(3,1)); + v2=(*ti).V(Tetra3::VofF(3,2)); VF.push_back(Facet(v0,v1,v2,&(*ti),3)); } @@ -378,16 +378,16 @@ void TestTTTopology(VertexContainer &vert,TetraContainer &tetra) { assert( ((((*ti).T(i))->T((*ti).Z(i)))==&(*ti))); - VertexType *v0=(*ti).V(Tetra4::VofF(i,0)); - VertexType *v1=(*ti).V(Tetra4::VofF(i,1)); - VertexType *v2=(*ti).V(Tetra4::VofF(i,2)); + VertexType *v0=(*ti).V(Tetra3::VofF(i,0)); + VertexType *v1=(*ti).V(Tetra3::VofF(i,1)); + VertexType *v2=(*ti).V(Tetra3::VofF(i,2)); TetraType *t1=(TetraType*)(*ti).T(i); int z1=(*ti).Z(i); - VertexType *vo0=(*t1).V(Tetra4::VofF(z1,0)); - VertexType *vo1=(*t1).V(Tetra4::VofF(z1,1)); - VertexType *vo2=(*t1).V(Tetra4::VofF(z1,2)); + VertexType *vo0=(*t1).V(Tetra3::VofF(z1,0)); + VertexType *vo1=(*t1).V(Tetra3::VofF(z1,1)); + VertexType *vo2=(*t1).V(Tetra3::VofF(z1,2)); assert((v0!=v1)&&(v0!=v2)&&(v1!=v2)); assert((vo0!=vo1)&&(vo0!=vo2)&&(vo1!=vo2)); diff --git a/vcg/complex/tetramesh/update/triconvert.h b/vcg/complex/tetramesh/update/triconvert.h index eeb726cb..617e5dc1 100644 --- a/vcg/complex/tetramesh/update/triconvert.h +++ b/vcg/complex/tetramesh/update/triconvert.h @@ -106,9 +106,9 @@ void Convert(TetraMeshType &tetram,TriangleMeshType &trim) for (int i=0;i<4;i++) if (ti->IsBorderF(i)) { - v0=ti->V(Tetra4::VofF(i,0)); - v1=ti->V(Tetra4::VofF(i,1)); - v2=ti->V(Tetra4::VofF(i,2)); + v0=ti->V(Tetra3::VofF(i,0)); + v1=ti->V(Tetra3::VofF(i,1)); + v2=ti->V(Tetra3::VofF(i,2)); FaceType f=FaceType(); f.ClearFlags(); f.V(0)=v0; diff --git a/vcg/simplex/tetrahedron/base.h b/vcg/simplex/tetrahedron/base.h index 31ec6d4d..bd35cba4 100644 --- a/vcg/simplex/tetrahedron/base.h +++ b/vcg/simplex/tetrahedron/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/04/26 09:38:54 pietroni +*** empty log message *** + Revision 1.2 2004/04/20 12:42:37 pietroni *** empty log message *** @@ -38,7 +41,7 @@ Revision 1.1 2004/04/15 08:54:20 pietroni #else #define NULL 0 #include -#include +#include namespace vcg { /** @@ -289,7 +292,7 @@ public: ScalarType ComputeVolume(){ - Tetra4 T(V(0)->cP(),V(1)->cP(),V(2)->cP(),V(3)->cP()); + Tetra3 T(V(0)->cP(),V(1)->cP(),V(2)->cP(),V(3)->cP()); #ifdef __VCGLIB_TETRA_Q _volume = T.ComputeVolume(); return _volume; diff --git a/vcg/simplex/vertex/base.h b/vcg/simplex/vertex/base.h index f0a28219..88f2a5a8 100644 --- a/vcg/simplex/vertex/base.h +++ b/vcg/simplex/vertex/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.6 2004/04/26 09:40:15 pietroni +*** empty log message *** + Revision 1.6 2004/04/23 14:55:06 pietroni conversion funtion @@ -573,20 +576,22 @@ static bool HasVFAdjacency() { //@{ template -inline Convert( const VERT_TYPE &v ) +inline Convert( VERT_TYPE &v ) { - this->P()=v->P(); - this._flags=v._flags; - if (this->HasNormal())&&(v.HasNormal()) - this->N()=v->N(); - if (this->HasColor())&&(v.HasColor()) - this->C()=v->C(); - if (this->HasMark())&&(v.HasMark()) - this.IMark()=v.IMark(); - if (this->HasQuality())&&(v.HasQuality()) - this->Q()=v->Q(); - if (this->HasTexture())&&(v.HasTexture()) - this->T()=v->T(); + P()=v.P(); + Flags()=v.Flags(); + if ((HasNormal())&&(v.HasNormal())) + N()=v.N(); + if ((HasColor())&&(v.HasColor())) + C()=v.C(); +#ifdef __VCGLIB_VERTEX_M + if ((HasMark())&&(v.HasMark())) + IMark()=v.IMark(); +#endif + if ((HasQuality())&&(v.HasQuality())) + Q()=v.Q(); + if ((HasTexture())&&(v.HasTexture())) + T()=v.T(); } //@} diff --git a/vcg/space/tetra3.h b/vcg/space/tetra3.h index 6ba39de5..9b2b1ebd 100644 --- a/vcg/space/tetra3.h +++ b/vcg/space/tetra3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.1 2004/04/22 13:19:12 ganovelli +first version + Revision 1.2 2004/04/20 16:26:48 pietroni *** empty log message *** @@ -46,7 +49,7 @@ namespace vcg { Templated class for storing a generic tetrahedron in a 3D space. Note the relation with the Face class of TetraMesh complex, both classes provide the P(i) access functions to their points and therefore they share the algorithms on it (e.g. area, normal etc...) */ -template class Tetra4 +template class Tetra3 { public: typedef SCALAR_TETRA_TYPE ScalarType; @@ -62,7 +65,7 @@ protected: public: ///constructor with 4 points - Tetra4(CoordType p0,CoordType p1,CoordType p2,CoordType p3) + Tetra3(CoordType p0,CoordType p1,CoordType p2,CoordType p3) { _v[0]=p0; _v[1]=p1; @@ -165,8 +168,8 @@ ScalarType ComputeAspectRatio() return vertface[indexV][indexF]; } - static int FofE(const int &indexE,const int &indexF) - { assert ((indexE<6)&&(indexF<2)); + static int FofE(const int &indexE,const int &indexSide) + { assert ((indexE<6)&&(indexSide<2)); static int edgeface[6][2]={{0,1}, {0,2}, {1,2},