30 #include <cxxtest/TestSuite.h>
32 #include "../../../common/math/test/WPositionTraits.h"
33 #include "../WPlane.h"
68 boost::shared_ptr< std::set< WPosition > > expected(
new std::set< WPosition > );
70 expected->insert(
WPosition( 1, 1.5, 1 ) );
72 expected->insert(
WPosition( 1.5, 1, 1 ) );
74 expected->insert(
WPosition( 1.5, 1.5, 1 ) );
75 expected->insert(
WPosition( 2, 1.5, 1 ) );
76 expected->insert(
WPosition( 1, 1.5, 1 ) );
77 expected->insert(
WPosition( 1.5, 2, 1 ) );
79 TS_ASSERT_EQUALS( *expected, *p.
samplePoints( 0.5, 2, 2 ) );
83 #endif // WPLANE_TEST_H
This only is a 3d double vector.
Represents a plane with a normal vector and a position in space.
void testFixedSampling(void)
Simple sampling test.
Unit tests the WPlane class.
boost::shared_ptr< std::set< WPosition > > samplePoints(const WGridRegular3D &grid, double stepWidth)
Computes sample points on that plane.