OpenWalnut 1.2.5
Public Member Functions
WMathTest Class Reference

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

#include <WMath_test.h>

Inheritance diagram for WMathTest:

List of all members.

Public Member Functions

void testTrianglePlaneIntersectionWithPointsInPlane (void)
 If some points are inside the plane the triangle is considered to intersect with that plane.
void testTrianglePlaneIntersectionWithNoPointInPlane (void)
 If no point is in plane but at not all are on one side the trinagle intersects.
void testTrianglePlaneIntersectionWithAllPointsOnOneSide (void)
 If all point are on one side of the plane no intersection can take place.
void testIntersectionOfPlaneWithSegment (void)
 The intersection of a plane plane with a segment, having a starting and an endpoint.
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.
void testIntersectionOfPlaneWithSegmentHavingOnePointInPlane (void)
 If an endpoint is inside of the plane then a point of intersection must exists and true must be returned.
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.
void testIntersectionOfPlaneWithLine (void)
 If a set of consecutive segements (aka line) is tested again intersection with that plane, each segment should be tested.
void testNoIntersectionOfPlaneWithLine (void)
 If none of the segments of the line intersects with the plane, false and 0,0,0 should be returned.
void testIntersectionPlaneLineWithJustOnePoint (void)
 If an endpoint of a line intersects with the plane, this point should be returned and ofcourse true.
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.
void testMultipleIntersectionPlaneLine (void)
 If many points of intersection occurs the closest to the base point should be selected and return true.
void testFactorials (void)
 Test the factorial calculation.

Detailed Description

Unit tests wmath's helper functions.

Definition at line 40 of file WMath_test.h.


Member Function Documentation

void WMathTest::testFactorials ( void  ) [inline]

Test the factorial calculation.

Definition at line 255 of file WMath_test.h.

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 146 of file WMath_test.h.

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

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 78 of file WMath_test.h.

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 109 of file WMath_test.h.

References wlimits::DBL_EPS.

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 130 of file WMath_test.h.

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 188 of file WMath_test.h.

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

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 209 of file WMath_test.h.

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

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 230 of file WMath_test.h.

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

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 167 of file WMath_test.h.

References WMixinVector< ValueT >::push_back().

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 94 of file WMath_test.h.

References wlimits::DBL_EPS.

void WMathTest::testTrianglePlaneIntersectionWithAllPointsOnOneSide ( void  ) [inline]

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

Definition at line 66 of file WMath_test.h.

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 57 of file WMath_test.h.

void WMathTest::testTrianglePlaneIntersectionWithPointsInPlane ( void  ) [inline]

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

Definition at line 46 of file WMath_test.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends