added BasicVertexPair templated class to store as less as possible of an edge...
This commit is contained in:
parent
a7e4270ddb
commit
23d9ad9684
|
@ -31,6 +31,19 @@
|
||||||
namespace vcg{
|
namespace vcg{
|
||||||
namespace tri{
|
namespace tri{
|
||||||
|
|
||||||
|
template < class VERTEX_TYPE>
|
||||||
|
class BasicVertexPair {
|
||||||
|
public:
|
||||||
|
inline BasicVertexPair() {};
|
||||||
|
inline BasicVertexPair( VERTEX_TYPE * v0, VERTEX_TYPE * v1){V(0) = v0; V(1) = v1; };
|
||||||
|
void Sort() {if(V(0)<V(0)) std::swap(V(0),V(0)); }
|
||||||
|
VERTEX_TYPE *&V(int i) { return v[i]; }
|
||||||
|
VERTEX_TYPE *cV(int i) const { return v[i]; }
|
||||||
|
private:
|
||||||
|
VERTEX_TYPE *v[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/** \addtogroup trimesh */
|
/** \addtogroup trimesh */
|
||||||
/*@{*/
|
/*@{*/
|
||||||
/** This a static utility class for the edge collapse.
|
/** This a static utility class for the edge collapse.
|
||||||
|
|
Loading…
Reference in New Issue