OpenWalnut
1.5.0dev
|
TriangleMesh utils. More...
Functions | |
std::shared_ptr< std::list< std::shared_ptr< WTriangleMesh > > > | componentDecomposition (const WTriangleMesh &mesh) |
Decompose the given mesh into connected components. More... | |
std::ostream & | operator<< (std::ostream &os, const WTriangleMesh &rhs) |
Prints for each mesh #vertices and #triangles, as well as each triangle with its positions. More... | |
TriangleMesh utils.
std::shared_ptr< std::list< std::shared_ptr< WTriangleMesh > > > tm_utils::componentDecomposition | ( | const WTriangleMesh & | mesh | ) |
Decompose the given mesh into connected components.
mesh | The triangle mesh to decompose |
Definition at line 705 of file WTriangleMesh.cpp.
References WUnionFind::find(), WTriangleMesh::getTriangles(), WTriangleMesh::getVertexArray(), WUnionFind::merge(), WTriangleMesh::triangleSize(), and WTriangleMesh::vertSize().
Referenced by WMTriangleMeshRenderer::renderMesh(), WTriangleMeshTest::testComponentDecomposition(), and WTriangleMeshTest::testComponentDecompositionOnEmptyMesh().
std::ostream & tm_utils::operator<< | ( | std::ostream & | os, |
const WTriangleMesh & | rhs | ||
) |
Prints for each mesh #vertices and #triangles, as well as each triangle with its positions.
No point IDs are printed.
os | Output stream to print on. |
rhs | The mesh instance. |
Definition at line 682 of file WTriangleMesh.cpp.
References WTriangleMesh::getTriangles(), WTriangleMesh::getVertexArray(), WTriangleMesh::triangleSize(), and WTriangleMesh::vertSize().