added oppositeF and V operators
This commit is contained in:
parent
bb87d68927
commit
e0cf265ce8
|
|
@ -109,7 +109,7 @@ void VVStarVT( typename TetraType::VertexPointer vp, std::vector<typename TetraT
|
||||||
|
|
||||||
starVec.clear();
|
starVec.clear();
|
||||||
|
|
||||||
VTIterator<TetraType> vti(vp->VTp(), vp->VTi());
|
VTIterator<TetraType> vti(vp);
|
||||||
|
|
||||||
while (!vti.End())
|
while (!vti.End())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#define _VCG_TETRA_TOPOLOGY
|
#define _VCG_TETRA_TOPOLOGY
|
||||||
|
|
||||||
#include <vcg/complex/algorithms/update/topology.h>
|
#include <vcg/complex/algorithms/update/topology.h>
|
||||||
|
#include <vcg/complex/algorithms/clean.h>
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
namespace tetrahedron {
|
namespace tetrahedron {
|
||||||
|
|
@ -93,6 +94,10 @@ inline void TriMeshFromBorder(TetraMesh & tetramesh, TriMesh & trimesh)
|
||||||
|
|
||||||
++fi;
|
++fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//do it while you build the mehs
|
||||||
|
vcg::tri::Clean<TriMesh>::RemoveDuplicateVertex(trimesh);
|
||||||
|
vcg::tri::Allocator<TriMesh>::CompactEveryVector(trimesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -315,6 +315,23 @@ class Tetra
|
||||||
return edgesface[indexE0][indexE1];
|
return edgesface[indexE0][indexE1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int FoppositeV (const int & indexV)
|
||||||
|
{
|
||||||
|
assert(indexV < 4 && indexV >= 0);
|
||||||
|
static int oppFaces[4] = { 3, 2, 1, 0 };
|
||||||
|
|
||||||
|
return oppFaces[indexV];
|
||||||
|
}
|
||||||
|
|
||||||
|
static int VoppositeF (const int & indexF)
|
||||||
|
{
|
||||||
|
assert(indexF < 4 && indexF >= 0);
|
||||||
|
static int oppVerts[4] = { 3, 2, 1, 0 };
|
||||||
|
|
||||||
|
return oppVerts[indexF];
|
||||||
|
}
|
||||||
|
|
||||||
|
// static int EoppositeE ()
|
||||||
/** @brief Computes the tetrahedron barycenter
|
/** @brief Computes the tetrahedron barycenter
|
||||||
*/
|
*/
|
||||||
template <class TetraType>
|
template <class TetraType>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue