25 const std::vector<BASE::array_parameter_t>& in_pts,
26 std::vector<BASE::array_point_t>& out_pts)
const 35 writeToStreamRender(
out);
36 out << m_cov << m_drawSolid3D << m_quantiles << (uint32_t)m_numSegments
47 readFromStreamRender(in);
49 in >> m_drawSolid3D >> m_quantiles;
50 m_numSegments = in.
ReadAs<uint32_t>();
64 static bool quickSolveEqn(
double a,
double b_2,
double c,
double& t)
66 double delta =
square(b_2) - a * c;
68 return (t = -b_2 / a) >= 0;
72 if ((t = (-b_2 - delta) / a) >= 0)
75 return (t = (-b_2 + delta) / a) >= 0;
84 #if 0 // Update, someday... 85 if (m_cov.rows() != 3)
return false;
90 for (
size_t i = 0; i < 3; i++)
94 for (
size_t j = 0; j < 3; j++)
96 double vji = m_eigVec(j, i);
101 double a = 0, b_2 = 0, c = -
square(m_quantiles);
102 for (
size_t i = 0; i < 3; i++)
104 double ev = m_eigVal(i, i);
109 return quickSolveEqn(a, b_2, c, dist);
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
TPoint3D pBase
Base point.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
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.
STORED_TYPE ReadAs()
De-serialize a variable and returns it by value.
TVector3D director
Director vector.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
return_t square(const num_t x)
Inline function for the square of a number.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A 2D ellipse on the XY plane, centered at the origin of this object pose.
Virtual base class for "archives": classes abstracting I/O streams.
void createFromPoseX(const mrpt::math::TPose3D &p, TLine3D &r)
Gets a 3D line corresponding to the X axis in a given pose.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::vision::TStereoCalibResults out
void unitarize()
Unitarize director vector.
This file implements matrix/vector text and binary serialization.
Renderizable generic renderer for objects using the wireframe shader.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
The namespace for 3D scene representation and rendering.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
IMPLEMENTS_SERIALIZABLE(CEllipsoid2D, CRenderizableShaderWireFrame, mrpt::opengl) void CEllipsoid2D
3D line, represented by a base point and a director vector.