Added ordered constructor that build a edge with unique ordering

among vertices (useful for edge-collapse simplification)
This commit is contained in:
Paolo Cignoni 2005-10-14 12:34:55 +00:00
parent a06ae78c6e
commit 4be15d81cd
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.8 2005/10/01 09:22:51 cignoni
Major rewriting of the whole class edge. Removed default flags and nonsense attibutes. Given consistent naming to defines.
Revision 1.7 2005/07/15 15:45:51 ganovelli Revision 1.7 2005/07/15 15:45:51 ganovelli
template parametere Scalar removed template parametere Scalar removed
@ -81,6 +84,12 @@ public:
inline EDGE_TYPE(VertexType* v0,VertexType* v1){v[0]=v0;v[1]=v1;} inline EDGE_TYPE(VertexType* v0,VertexType* v1){v[0]=v0;v[1]=v1;}
static inline EDGE_TYPE OrderedEdge(VertexType* v0,VertexType* v1){
if(v0<v1) return EDGE_TYPE(v0,v1);
else return EDGE_TYPE(v1,v0);
}
/// Costructor /// Costructor
inline void Set(VertexType* v0,VertexType* v1){v[0]=v0;v[1]=v1;} inline void Set(VertexType* v0,VertexType* v1){v[0]=v0;v[1]=v1;}