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();
|
||||
|
||||
VTIterator<TetraType> vti(vp->VTp(), vp->VTi());
|
||||
VTIterator<TetraType> vti(vp);
|
||||
|
||||
while (!vti.End())
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define _VCG_TETRA_TOPOLOGY
|
||||
|
||||
#include <vcg/complex/algorithms/update/topology.h>
|
||||
#include <vcg/complex/algorithms/clean.h>
|
||||
|
||||
namespace vcg {
|
||||
namespace tetrahedron {
|
||||
|
@ -77,7 +78,7 @@ inline void TriMeshFromBorder(TetraMesh & tetramesh, TriMesh & trimesh)
|
|||
|
||||
for (int i = 0; i < verts.size(); i += 3)
|
||||
{
|
||||
fi->Alloc(3);
|
||||
fi->Alloc(3);
|
||||
|
||||
vi->P() = verts[i + 0]->P();
|
||||
fi->V(0) = &*vi;
|
||||
|
@ -93,6 +94,10 @@ inline void TriMeshFromBorder(TetraMesh & tetramesh, TriMesh & trimesh)
|
|||
|
||||
++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];
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
template <class TetraType>
|
||||
|
|
Loading…
Reference in New Issue