31 #include <cxxtest/TestSuite.h>
33 #include "../../../common/math/test/WPositionTraits.h"
34 #include "../WPlane.h"
69 std::shared_ptr< std::set< WPosition > > expected(
new std::set< WPosition > );
71 expected->insert(
WPosition( 1, 1.5, 1 ) );
73 expected->insert(
WPosition( 1.5, 1, 1 ) );
75 expected->insert(
WPosition( 1.5, 1.5, 1 ) );
76 expected->insert(
WPosition( 2, 1.5, 1 ) );
77 expected->insert(
WPosition( 1, 1.5, 1 ) );
78 expected->insert(
WPosition( 1.5, 2, 1 ) );
80 TS_ASSERT_EQUALS( *expected, *p.
samplePoints( 0.5, 2, 2 ) );
Unit tests the WPlane class.
void testFixedSampling(void)
A predefined number of sampling points with step width from the center position.
Represents a plane with a normal vector and a position in space.
std::shared_ptr< std::set< WPosition > > samplePoints(const WGridRegular3D &grid, double stepWidth)
Computes sample points on that plane.
This only is a 3d double vector.