templated with also tetratype...

This commit is contained in:
Nico Pietroni 2004-05-14 11:48:43 +00:00
parent d09e65a2dc
commit ba3f257801
1 changed files with 8 additions and 5 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.6 2004/05/14 11:07:36 turini
Changed swap in std::swap.
Revision 1.5 2004/05/06 15:29:42 pietroni Revision 1.5 2004/05/06 15:29:42 pietroni
changed names to topology functions changed names to topology functions
@ -58,7 +61,7 @@ namespace vcg {
@param VTYPE (Template Parameter) Specifies the type for the vertex. @param VTYPE (Template Parameter) Specifies the type for the vertex.
*/ */
template < class VTYPE > template < class VTYPE, class TTYPE >
class TETRA_TYPE{ class TETRA_TYPE{
public: public:
@ -204,12 +207,12 @@ and 2 array to implement the list of Vertex - Tetrahedron Topology (List of Tetr
#ifdef __VCGLIB_TETRA_AT #ifdef __VCGLIB_TETRA_AT
protected: protected:
///pointers to tetrahedron for tetrahedron-tetrahedron topology (sharing same face) ///pointers to tetrahedron for tetrahedron-tetrahedron topology (sharing same face)
TETRA_TYPE *_ttp[4]; TTYPE *_ttp[4];
///index of face for tetrahedron-tetrahedron topology (sharing same face) ///index of face for tetrahedron-tetrahedron topology (sharing same face)
int _tti[4]; int _tti[4];
public: public:
///Function to access the Tetrahedron that share the index-face (extern face returns a pointer to himself) ///Function to access the Tetrahedron that share the index-face (extern face returns a pointer to himself)
TETRA_TYPE *&TTp(const int &index) TTYPE *&TTp(const int &index)
{ {
return _ttp[index]; return _ttp[index];
} }
@ -223,12 +226,12 @@ public:
#ifdef __VCGLIB_TETRA_AV #ifdef __VCGLIB_TETRA_AV
protected: protected:
///pointers to tetrahedron for vertex-tetrahedron topology (sharing same vertex) ///pointers to tetrahedron for vertex-tetrahedron topology (sharing same vertex)
TETRA_TYPE *_tvp[4]; TTYPE *_tvp[4];
///index of vertex for vertex-tetrahedron topology (sharing same vertex) ///index of vertex for vertex-tetrahedron topology (sharing same vertex)
short int _tvi[4]; short int _tvi[4];
public: public:
///Function to access the Next Tetrahedron of the list that share the index-face (end of list is Null) ///Function to access the Next Tetrahedron of the list that share the index-face (end of list is Null)
TETRA_TYPE *&TVp(const int &index) TTYPE *&TVp(const int &index)
{ {
return _tvp[index]; return _tvp[index];
} }