10 #include <CTraitsTest.h> 11 #include <gtest/gtest.h> 23 template class mrpt::CTraitsTest<mrpt::math::TPoint2D>;
24 template class mrpt::CTraitsTest<mrpt::math::TPoint3D>;
25 template class mrpt::CTraitsTest<mrpt::math::TPoint3Df>;
26 template class mrpt::CTraitsTest<mrpt::math::TPose2D>;
27 template class mrpt::CTraitsTest<mrpt::math::TPose3D>;
28 template class mrpt::CTraitsTest<mrpt::math::TPose3DQuat>;
30 TEST(LightGeomData, PragmaPack)
65 TEST(LightGeomData, ConstExprCtors)
74 static_assert(p.x == 1.0,
"p.x == 1.0");
75 static_assert(p.y == 2.0,
"p.y == 2.0");
76 static_assert(p[0] == 1.0,
"p[0] == 1.0");
77 static_assert(p[1] == 2.0,
"p[1] == 2.0");
81 static_assert(p.x == 1.0,
"p.x == 1.0");
82 static_assert(p.y == 2.0,
"p.y == 2.0");
83 static_assert(p.z == 3.0,
"p.z == 3.0");
84 static_assert(p[0] == 1.0,
"p[0] == 1.0");
85 static_assert(p[1] == 2.0,
"p[1] == 2.0");
86 static_assert(p[2] == 3.0,
"p[2] == 3.0");
89 constexpr
TPose3D p(1.0, 2.0, 3.0, 0.1, 0.2, 0.3);
90 static_assert(p.x == 1.0,
"p.x == 1.0");
91 static_assert(p.y == 2.0,
"p.y == 2.0");
92 static_assert(p.z == 3.0,
"p.z == 3.0");
102 static_assert(p_add.x == 6.0,
"p_add.x == 6.0");
103 static_assert(p_add.y == 8.0,
"p_add.y == 8.0");
105 static_assert(p_sub.x == 2.0,
"p_sub.x == 2.0");
106 static_assert(p_sub.y == 4.0,
"p_sub.y == 4.0");
108 static_assert(p_mul.x == 8.0,
"p_mul.x == 8.0");
109 static_assert(p_mul.y == 12.0,
"p_mul.y == 12.0");
111 static_assert(p_div.x == 2.0,
"p_div.x == 2.0");
112 static_assert(p_div.y == 3.0,
"p_div.y == 3.0");
116 TEST(LightGeomData, Conversions)
119 TPose3D p1{1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
133 TEST(LightGeomData, Comparisons)
138 EXPECT_FALSE(p1 < p2);
144 EXPECT_FALSE(p2 < p1);
155 EXPECT_EQ(s,
"[1.000000 2.000000 180.000000]");
160 EXPECT_DOUBLE_EQ(p.
x, 1);
161 EXPECT_DOUBLE_EQ(p.
y, 2);
TEST(LightGeomData, PragmaPack)
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
double roll
Roll coordinate (rotation angle over X coordinate).
double yaw
Yaw coordinate (rotation angle over Z axis).
void fromString(const std::string &s)
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45...
This base provides a set of functions for maths stuff.
2D segment, consisting of two points.
TPoint2D point2
Destiny point.
double pitch
Pitch coordinate (rotation angle over Y axis).
TPoint2D point1
Origin point.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
double phi
Orientation (rads)