25 #ifndef WTRIANGLEMESH_TEST_H
26 #define WTRIANGLEMESH_TEST_H
32 #include <cxxtest/TestSuite.h>
34 #include "../../common/math/linearAlgebra/WPosition.h"
35 #include "../WTriangleMesh.h"
36 #include "WTriangleMeshTraits.h"
309 TS_ASSERT_EQUALS( expected, mesh );
311 TS_ASSERT_DIFFERS( expected, mesh );
396 TS_ASSERT_EQUALS( components->size(), 7 );
398 std::list< boost::shared_ptr< WTriangleMesh > >::const_iterator cit = components->begin();
404 TS_ASSERT_EQUALS( **cit, expected );
442 TS_ASSERT( result->empty() );
445 #endif // WTRIANGLEMESH_TEST_H
void testEqualityOperator(void)
Ensure instatiation does not throw and does initialization right.
void testComponentDecomposition(void)
Decompose the following scene into seven components A, B, C, D, E, F, G.
size_t addVertex(osg::Vec3 vert)
adds a vertex position to the mesh
Testing the WTriangleMesh class.
This only is a 3d double vector.
boost::shared_ptr< std::list< boost::shared_ptr< WTriangleMesh > > > componentDecomposition(const WTriangleMesh &mesh)
Decompose the given mesh into connected components.
Triangle mesh data structure allowing for convenient access of the elements.
void addTriangle(size_t vert0, size_t vert1, size_t vert2)
adds a tringle to the mesh
void testComponentDecompositionOnEmptyMesh(void)
On an empty mesh an empty list should be generated.
std::vector< size_t > m_triangles
array containing the triangles