15 #include <gtest/gtest.h> 52 pts.getPoint(i,
x,
y,
z);
67 EXPECT_EQ(pts2.size(),pts3.size());
72 pts2.getPoint(i,x2,y2,z2);
73 pts3.getPoint(i,x3,y3,z3);
91 pts.clipOutOfRangeInZ(-10,-1);
92 EXPECT_EQ(pts.size(),0u);
98 pts.clipOutOfRangeInZ(-10,10);
99 EXPECT_EQ(pts.size(),9u);
105 pts.clipOutOfRangeInZ(0.5,1.5);
106 EXPECT_EQ(pts.size(),3u);
120 const float radius = 0.5;
123 pts.clipOutOfRange(pivot,radius);
124 EXPECT_EQ(pts.size(),1u);
130 const float radius = 1;
133 pts.clipOutOfRange(pivot,radius);
134 EXPECT_EQ(pts.size(),0u);
140 const float radius = 1.1f;
143 pts.clipOutOfRange(pivot,radius);
144 EXPECT_EQ(pts.size(),3u);
150 TEST(CSimplePointsMapTests, insertPoints)
152 do_test_insertPoints<CSimplePointsMap>();
155 TEST(CWeightedPointsMapTests, insertPoints)
157 do_test_insertPoints<CWeightedPointsMap>();
160 TEST(CColouredPointsMapTests, insertPoints)
162 do_test_insertPoints<CColouredPointsMap>();
166 TEST(CSimplePointsMapTests, clipOutOfRangeInZ)
168 do_test_clipOutOfRangeInZ<CSimplePointsMap>();
171 TEST(CWeightedPointsMapTests, clipOutOfRangeInZ)
173 do_test_clipOutOfRangeInZ<CWeightedPointsMap>();
176 TEST(CColouredPointsMapTests, clipOutOfRangeInZ)
178 do_test_clipOutOfRangeInZ<CColouredPointsMap>();
181 TEST(CSimplePointsMapTests, clipOutOfRange)
183 do_test_clipOutOfRange<CSimplePointsMap>();
186 TEST(CWeightedPointsMapTests, clipOutOfRange)
188 do_test_clipOutOfRange<CWeightedPointsMap>();
191 TEST(CColouredPointsMapTests, clipOutOfRange)
193 do_test_clipOutOfRange<CColouredPointsMap>();
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
const float demo9_zs[demo9_N]
void do_test_clipOutOfRange()
void do_test_clipOutOfRangeInZ()
const float demo9_xs[demo9_N]
This base provides a set of functions for maths stuff.
This namespace contains representation of robot actions and observations.
const float demo9_ys[demo9_N]
A class used to store a 2D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void load_demo_9pts_map(MAP &pts)
void do_test_insertPoints()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TEST(CSimplePointsMapTests, insertPoints)