OpenWalnut  1.4.0
Public Member Functions
WTriangleMeshTest Class Reference

Testing the WTriangleMesh class. More...

#include <WTriangleMesh_test.h>

+ Inheritance diagram for WTriangleMeshTest:

List of all members.

Public Member Functions

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.
void testComponentDecompositionOnEmptyMesh (void)
 On an empty mesh an empty list should be generated.

Detailed Description

Testing the WTriangleMesh class.

Definition at line 41 of file WTriangleMesh_test.h.


Member Function Documentation

Decompose the following scene into seven components A, B, C, D, E, F, G.


     12      o-----o          o----o
            / \   / \         |\  /|
           /   \ /   \        | \/ |
     11   o-----o-----o       | /\ |
           \   / \   /        |/  \|
     10     \ /   \ /         o----o B
      9      o-----o  A

      8            o
      7      o     |\
            / \    | \
           /   \   |  \
      6   o-----o--+--o\
      5          \ o-+--o C
                  \ /
      4            o D

      3   o E (degenerated)

      2   o-----o F (degenerated)

      1   o-----o G
           \   /
            \ /
      0      o

          0  1  2  3  4 5     6    7

     

Definition at line 348 of file WTriangleMesh_test.h.

References WTriangleMesh::addTriangle(), WTriangleMesh::addVertex(), and tm_utils::componentDecomposition().

On an empty mesh an empty list should be generated.

Definition at line 438 of file WTriangleMesh_test.h.

References tm_utils::componentDecomposition().

void WTriangleMeshTest::testEqualityOperator ( void  ) [inline]

Ensure instatiation does not throw and does initialization right.

clearMesh should reset all members. fastAddVert should increment the corresponding counter fastAddTriangle should increment the corresponding counter setVertices should set the fastAddId and resize the member setTriangles should set the fastAddId and resize the member Test getTriangleNormal Test computeTriNormals Test computeVertNormals Two WTriangleMeshes are considered to be equal only if they have the same points in same order and the same indices of points for the triangles also in same order. From an objective point of view there might be different ordering resuling in the same structure, but this is to expensive to compute.

Definition at line 299 of file WTriangleMesh_test.h.

References WTriangleMesh::addTriangle(), WTriangleMesh::addVertex(), and WTriangleMesh::m_triangles.


The documentation for this class was generated from the following file: