OpenWalnut  1.5.0dev
Public Member Functions | List of all members
WMathTest Class Reference

Unit tests wmath's helper functions. More...

#include <WMath_test.h>

+ Inheritance diagram for WMathTest:
+ Collaboration diagram for WMathTest:

Public Member Functions

void testTrianglePlaneIntersectionWithPointsInPlane (void)
 If some points are inside the plane the triangle is considered to intersect with that plane. More...
 
void testTrianglePlaneIntersectionWithNoPointInPlane (void)
 If no point is in plane but at not all are on one side the trinagle intersects. More...
 
void testTrianglePlaneIntersectionWithAllPointsOnOneSide (void)
 If all point are on one side of the plane no intersection can take place. More...
 
void testIntersectionOfPlaneWithSegment (void)
 The intersection of a plane plane with a segment, having a starting and an endpoint. More...
 
void testNoIntersectionOfPlaneWithSegment (void)
 If there is no intersection at all the position 0,0,0 should be written into the point of intersection and false should be returned. More...
 
void testIntersectionOfPlaneWithSegmentHavingOnePointInPlane (void)
 If an endpoint is inside of the plane then a point of intersection must exists and true must be returned. More...
 
void testIntersectionOfPlaneWithSegmentInPlane (void)
 If the segment is totally inside of the plane, the first point must be returned which is actually one (of many intersecting points) intersecting point and true must be returned. More...
 
void testIntersectionOfPlaneWithLine (void)
 If a set of consecutive segements (aka line) is tested again intersection with that plane, each segment should be tested. More...
 
void testNoIntersectionOfPlaneWithLine (void)
 If none of the segments of the line intersects with the plane, false and 0,0,0 should be returned. More...
 
void testIntersectionPlaneLineWithJustOnePoint (void)
 If an endpoint of a line intersects with the plane, this point should be returned and ofcourse true. More...
 
void testIntersectionPlaneLineWithSegmentInPlane (void)
 If a whole segment of the line is insisde that plane the first point should be returned along with true as return code. More...
 
void testMultipleIntersectionPlaneLine (void)
 If many points of intersection occurs the closest to the base point should be selected and return true. More...
 
void testFactorials (void)
 Test the factorial calculation. More...
 
void testAreEqual (void)
 Test the areEqual function. More...
 

Detailed Description

Unit tests wmath's helper functions.

Definition at line 41 of file WMath_test.h.

Member Function Documentation

◆ testAreEqual()

void WMathTest::testAreEqual ( void  )
inline

Test the areEqual function.

Definition at line 273 of file WMath_test.h.

◆ testFactorials()

void WMathTest::testFactorials ( void  )
inline

Test the factorial calculation.

Definition at line 256 of file WMath_test.h.

◆ testIntersectionOfPlaneWithLine()

void WMathTest::testIntersectionOfPlaneWithLine ( void  )
inline

If a set of consecutive segements (aka line) is tested again intersection with that plane, each segment should be tested.

Definition at line 147 of file WMath_test.h.

References wlimits::DBL_EPS, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testIntersectionOfPlaneWithSegment()

void WMathTest::testIntersectionOfPlaneWithSegment ( void  )
inline

The intersection of a plane plane with a segment, having a starting and an endpoint.

It should be a commutative operation in terms of staring and ending points.

Definition at line 79 of file WMath_test.h.

◆ testIntersectionOfPlaneWithSegmentHavingOnePointInPlane()

void WMathTest::testIntersectionOfPlaneWithSegmentHavingOnePointInPlane ( void  )
inline

If an endpoint is inside of the plane then a point of intersection must exists and true must be returned.

Definition at line 110 of file WMath_test.h.

References wlimits::DBL_EPS.

◆ testIntersectionOfPlaneWithSegmentInPlane()

void WMathTest::testIntersectionOfPlaneWithSegmentInPlane ( void  )
inline

If the segment is totally inside of the plane, the first point must be returned which is actually one (of many intersecting points) intersecting point and true must be returned.

Definition at line 131 of file WMath_test.h.

◆ testIntersectionPlaneLineWithJustOnePoint()

void WMathTest::testIntersectionPlaneLineWithJustOnePoint ( void  )
inline

If an endpoint of a line intersects with the plane, this point should be returned and ofcourse true.

Definition at line 189 of file WMath_test.h.

References wlimits::DBL_EPS, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testIntersectionPlaneLineWithSegmentInPlane()

void WMathTest::testIntersectionPlaneLineWithSegmentInPlane ( void  )
inline

If a whole segment of the line is insisde that plane the first point should be returned along with true as return code.

Definition at line 210 of file WMath_test.h.

References wlimits::DBL_EPS, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testMultipleIntersectionPlaneLine()

void WMathTest::testMultipleIntersectionPlaneLine ( void  )
inline

If many points of intersection occurs the closest to the base point should be selected and return true.

Definition at line 231 of file WMath_test.h.

References wlimits::DBL_EPS, and WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testNoIntersectionOfPlaneWithLine()

void WMathTest::testNoIntersectionOfPlaneWithLine ( void  )
inline

If none of the segments of the line intersects with the plane, false and 0,0,0 should be returned.

Definition at line 168 of file WMath_test.h.

References WMixinVector< ValueT >::push_back().

+ Here is the call graph for this function:

◆ testNoIntersectionOfPlaneWithSegment()

void WMathTest::testNoIntersectionOfPlaneWithSegment ( void  )
inline

If there is no intersection at all the position 0,0,0 should be written into the point of intersection and false should be returned.

Definition at line 95 of file WMath_test.h.

References wlimits::DBL_EPS.

◆ testTrianglePlaneIntersectionWithAllPointsOnOneSide()

void WMathTest::testTrianglePlaneIntersectionWithAllPointsOnOneSide ( void  )
inline

If all point are on one side of the plane no intersection can take place.

Definition at line 67 of file WMath_test.h.

◆ testTrianglePlaneIntersectionWithNoPointInPlane()

void WMathTest::testTrianglePlaneIntersectionWithNoPointInPlane ( void  )
inline

If no point is in plane but at not all are on one side the trinagle intersects.

Definition at line 58 of file WMath_test.h.

◆ testTrianglePlaneIntersectionWithPointsInPlane()

void WMathTest::testTrianglePlaneIntersectionWithPointsInPlane ( void  )
inline

If some points are inside the plane the triangle is considered to intersect with that plane.

Definition at line 47 of file WMath_test.h.


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