17 #ifndef GZ_MSGS_UTILITY_HH_
18 #define GZ_MSGS_UTILITY_HH_
24 #include <gz/math/AxisAlignedBox.hh>
25 #include <gz/math/Color.hh>
26 #include <gz/math/Inertial.hh>
27 #include <gz/math/Pose3.hh>
28 #include <gz/math/Plane.hh>
29 #include <gz/math/SphericalCoordinates.hh>
30 #include <gz/math/Vector3.hh>
32 #include "gz/msgs/config.hh"
33 #include "gz/msgs/Export.hh"
34 #include "gz/msgs/MessageTypes.hh"
45 inline namespace GZ_MSGS_VERSION_NAMESPACE {
75 math::Color
Convert(
const msgs::Color &_c);
94 math::SphericalCoordinates
Convert(
95 const msgs::SphericalCoordinates &_coord);
110 math::AxisAlignedBox
Convert(
const msgs::AxisAlignedBox &_b);
117 msgs::AxisAlignedBox
Convert(
const math::AxisAlignedBox &_b);
129 bool Convert(
const msgs::Boolean &_m);
135 int32_t
Convert(
const msgs::Int32 &_m);
141 uint32_t
Convert(
const msgs::UInt32 &_m);
147 int64_t
Convert(
const msgs::Int64 &_m);
153 uint64_t
Convert(
const msgs::UInt64 &_m);
159 double Convert(
const msgs::Double &_m);
165 float Convert(
const msgs::Float &_m);
171 std::chrono::steady_clock::duration
Convert(
const msgs::Time &_time);
201 msgs::Color
Convert(
const math::Color &_c);
220 msgs::SphericalCoordinates
Convert(
221 const math::SphericalCoordinates &_coord);
247 msgs::Boolean
Convert(
const bool &_b);
253 msgs::Int32
Convert(
const int32_t &_i);
259 msgs::UInt32
Convert(
const uint32_t &_u);
265 msgs::Int64
Convert(
const int64_t &_i);
271 msgs::UInt64
Convert(
const uint64_t &_u);
277 msgs::Double
Convert(
const double &_d);
283 msgs::Float
Convert(
const float &_f);
291 const std::chrono::steady_clock::duration &_time_point);
374 void Set(msgs::Color *_c,
const math::Color &_v);
393 void Set(msgs::SphericalCoordinates *_sc,
394 const math::SphericalCoordinates &_m);
412 void Set(msgs::Boolean *_p,
const bool &_v);
418 void Set(msgs::Int32 *_p,
const int32_t &_v);
424 void Set(msgs::UInt32 *_p,
const uint32_t &_v);
430 void Set(msgs::Int64 *_p,
const int64_t &_v);
436 void Set(msgs::UInt64 *_p,
const uint64_t &_v);
442 void Set(msgs::Double *_p,
const double &_v);
448 void Set(msgs::Float *_p,
const float &_v);
454 void Set(msgs::AxisAlignedBox *_b,
const math::AxisAlignedBox &_v);
497 msgs::FuelMetadata &_meta);