OpenWalnut
1.5.0dev
|
Tests the WGridTransform class. More...
#include <WGridTransformOrtho_test.h>
Public Member Functions | |
void | testInstantiation () |
Test if all data fields get initialized correctly. More... | |
void | testCompareConstructors () |
Different constructors should not yield differently initialized data fields. More... | |
void | testTransformationToWorldSpace () |
Test transformation from grid space to world space. More... | |
void | testTransformationToGridSpace () |
Test transformation from world space to grid space. More... | |
Private Member Functions | |
void | compareVectors (WVector3d const &v1, WVector3d const &v2, double delta) const |
Compares two vectors, element by element. More... | |
Tests the WGridTransform class.
Definition at line 42 of file WGridTransformOrtho_test.h.
|
inlineprivate |
Compares two vectors, element by element.
v1 | The first vector. |
v2 | The second vector. |
delta | The maximum absolute difference between the elements of the vectors. |
Definition at line 282 of file WGridTransformOrtho_test.h.
Referenced by testCompareConstructors(), testInstantiation(), testTransformationToGridSpace(), and testTransformationToWorldSpace().
|
inline |
Different constructors should not yield differently initialized data fields.
Definition at line 133 of file WGridTransformOrtho_test.h.
References compareVectors(), WGridTransformOrthoTemplate< T >::getDirectionX(), WGridTransformOrthoTemplate< T >::getDirectionY(), WGridTransformOrthoTemplate< T >::getDirectionZ(), WGridTransformOrthoTemplate< T >::getOffsetX(), WGridTransformOrthoTemplate< T >::getOffsetY(), WGridTransformOrthoTemplate< T >::getOffsetZ(), WGridTransformOrthoTemplate< T >::getOrigin(), and WMatrix< T >::makeIdentity().
|
inline |
Test if all data fields get initialized correctly.
Constructors should throw a WPreconditionNotMet exception if any input values are invalid.
Definition at line 49 of file WGridTransformOrtho_test.h.
References compareVectors(), WGridTransformOrthoTemplate< T >::getDirectionX(), WGridTransformOrthoTemplate< T >::getDirectionY(), WGridTransformOrthoTemplate< T >::getDirectionZ(), WGridTransformOrthoTemplate< T >::getOffsetX(), WGridTransformOrthoTemplate< T >::getOffsetY(), WGridTransformOrthoTemplate< T >::getOffsetZ(), WGridTransformOrthoTemplate< T >::getOrigin(), WGridTransformOrthoTemplate< T >::getUnitDirectionX(), WGridTransformOrthoTemplate< T >::getUnitDirectionY(), WGridTransformOrthoTemplate< T >::getUnitDirectionZ(), and WMatrix< T >::makeIdentity().
|
inline |
Test transformation from world space to grid space.
Definition at line 219 of file WGridTransformOrtho_test.h.
References compareVectors(), WGridTransformOrthoTemplate< T >::directionToGridSpace(), WMatrix< T >::makeIdentity(), and WGridTransformOrthoTemplate< T >::positionToGridSpace().
|
inline |
Test transformation from grid space to world space.
Definition at line 158 of file WGridTransformOrtho_test.h.
References compareVectors(), WGridTransformOrthoTemplate< T >::directionToWorldSpace(), WMatrix< T >::makeIdentity(), and WGridTransformOrthoTemplate< T >::positionToWorldSpace().