25 #ifndef WTRIANGLEMESH_TEST_H
26 #define WTRIANGLEMESH_TEST_H
33 #include <cxxtest/TestSuite.h>
35 #include "../../common/math/linearAlgebra/WPosition.h"
36 #include "../WTriangleMesh.h"
37 #include "WTriangleMeshTraits.h"
310 TS_ASSERT_EQUALS( expected, mesh );
312 TS_ASSERT_DIFFERS( expected, mesh );
397 TS_ASSERT_EQUALS( components->size(), 7 );
399 std::list< std::shared_ptr< WTriangleMesh > >::const_iterator cit = components->begin();
405 TS_ASSERT_EQUALS( **cit, expected );
443 TS_ASSERT( result->empty() );
This only is a 3d double vector.
Testing the WTriangleMesh class.
void testEqualityOperator(void)
Two WTriangleMeshes are considered to be equal only if they have the same points in same order and th...
void testComponentDecomposition(void)
Decompose the following scene into seven components A, B, C, D, E, F, G.
void testComponentDecompositionOnEmptyMesh(void)
On an empty mesh an empty list should be generated.
Triangle mesh data structure allowing for convenient access of the elements.
std::vector< size_t > m_triangles
array containing the triangles
void addTriangle(size_t vert0, size_t vert1, size_t vert2)
adds a tringle to the mesh
size_t addVertex(osg::Vec3 vert)
adds a vertex position to the mesh
std::shared_ptr< std::list< std::shared_ptr< WTriangleMesh > > > componentDecomposition(const WTriangleMesh &mesh)
Decompose the given mesh into connected components.