15 #include <Eigen/Dense> 30 const std::vector<BASE::array_parameter_t>& in_pts,
31 std::vector<BASE::array_point_t>& out_pts)
const 36 const size_t N = in_pts.size();
38 for (
size_t i = 0; i < N; i++)
40 const double inv_range = in_pts[i][0];
41 const double yaw = in_pts[i][1];
42 const double range = inv_range < 0
44 : (inv_range != 0 ? 1. / inv_range : 0);
45 out_pts[i][0] =
range * cos(yaw);
46 out_pts[i][1] =
range * sin(yaw);
56 writeToStreamRender(out);
57 BASE::thisclass_writeToStream(out);
59 out << m_underflowMaxRange;
68 readFromStreamRender(
in);
69 BASE::thisclass_readFromStream(
in);
71 in >> m_underflowMaxRange;
void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
IMPLEMENTS_SERIALIZABLE(CEllipsoidInverseDepth2D, CRenderizableDisplayList, mrpt::opengl) void CEllipsoidInverseDepth2D
An especial "ellipsoid" in 3D computed as the uncertainty iso-surfaces of a (inv_range,yaw) variable.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A renderizable object suitable for rendering with OpenGL's display lists.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
This file implements matrix/vector text and binary serialization.
The namespace for 3D scene representation and rendering.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
void transformFromParameterSpace(const std::vector< BASE::array_parameter_t > &in_pts, std::vector< BASE::array_point_t > &out_pts) const override
To be implemented by derived classes: maps, using some arbitrary space transformation, a list of points defining an ellipsoid in parameter space into their corresponding points in 2D/3D space.