modified the conversion funtion to take submesh (containers of tetrahedrons)

This commit is contained in:
Nico Pietroni 2004-06-15 16:13:59 +00:00
parent 841b0966bb
commit 7fd10bfcef
1 changed files with 7 additions and 4 deletions

View File

@ -77,6 +77,9 @@ public:
/// The type of const face iterator /// The type of const face iterator
typedef typename TriangleMeshType::ConstFaceIterator ConstFaceIterator; typedef typename TriangleMeshType::ConstFaceIterator ConstFaceIterator;
/// The type of tetrahedrons container
typedef typename TetraMeshType::TetraContainer TetraContainer;
/// The type of const vertex pointer of tetrahedral mesh /// The type of const vertex pointer of tetrahedral mesh
typedef typename TetraMeshType::const_VertexPointer const_VertexPointer; typedef typename TetraMeshType::const_VertexPointer const_VertexPointer;
@ -89,7 +92,7 @@ public:
//@{ //@{
///this function build a triangle mesh using the same pointers to the tetrahedral mesh vertex ///this function build a triangle mesh using the same pointers to the tetrahedral mesh vertex
void Convert(TetraMeshType &tetram,TriangleMeshType &trim) void Convert(TetraContainer &tetra,TriangleMeshType &trim)
{ {
TetraIterator ti; TetraIterator ti;
@ -98,7 +101,7 @@ void Convert(TetraMeshType &tetram,TriangleMeshType &trim)
TetraVertexType *v2; TetraVertexType *v2;
trim.Clear(); trim.Clear();
for (ti=tetram.tetra.begin();ti<tetram.tetra.end();ti++) for (ti=tetra.begin();ti<tetra.end();ti++)
{ {
if (!(ti->IsD())) if (!(ti->IsD()))
{ {
@ -144,14 +147,14 @@ struct InsertedV{
///this function build a triangle mesh using new pointers to the tetrahedral mesh vertex ///this function build a triangle mesh using new pointers to the tetrahedral mesh vertex
void ConvertCopy(TetraMeshType &tetram,TriangleMeshType &trim) void ConvertCopy(TetraContainer &tetra,TriangleMeshType &trim)
{ {
vector<InsertedV > newVertices; vector<InsertedV > newVertices;
TriVertexIterator vi; TriVertexIterator vi;
vector<TriVertexType*> redirect; vector<TriVertexType*> redirect;
Convert(tetram,trim); Convert(tetra,trim);
FaceIterator fi; FaceIterator fi;