#include <CMyEllipsoid.h>
Public Member Functions | |
CObject * | duplicate () |
void | enableDrawSolid3D (bool v) |
If set to true (default), a whole ellipsoid surface will be drawn, or if set to "false" it will be drawn as a "wireframe". | |
virtual void | getBoundingBox (mrpt::math::TPoint3D &, mrpt::math::TPoint3D &) const |
mrpt::math::CMatrixDouble | getCovMatrix () const |
float | getLineWidth () const |
float | getQuantiles () const |
void | render_dl () const |
void | set2DsegmentsCount (unsigned int N) |
The number of segments of a 2D ellipse (default=20) | |
void | set3DsegmentsCount (unsigned int N) |
The number of segments of a 3D ellipse (in both "axis") (default=20) | |
void | setCovMatrix (const mrpt::math::CMatrixDouble &m, int resizeToSize=-1) |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size) | |
void | setCovMatrix (const mrpt::math::CMatrixFloat &m, int resizeToSize=-1) |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size). | |
template<typename T > | |
void | setCovMatrix (const mrpt::math::CMatrixFixedNumeric< T, 3, 3 > &m, int resizeToSize=-1) |
template<typename T > | |
void | setCovMatrix (const mrpt::math::CMatrixFixedNumeric< T, 2, 2 > &m) |
void | setLineWidth (float w) |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1) | |
void | setQuantiles (float q) |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3) | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
Protected Attributes | |
unsigned int | m_2D_segments |
The number of segments of a 2D ellipse (default=20) | |
unsigned int | m_3D_segments |
The number of segments of a 3D ellipse (in both "axis") (default=20) | |
math::CMatrixD | m_cov |
The 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid. | |
bool | m_drawSolid3D |
If set to true (default), a whole ellipsoid surface will be drawn, or if set to "false" it will be drawn as a "wireframe". | |
math::CMatrixD | m_eigVal |
math::CMatrixD | m_eigVec |
float | m_lineWidth |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1) | |
math::CMatrixD | m_prevComputedCov |
float | m_quantiles |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3) | |
Private Member Functions | |
CMyEllipsoid () | |
virtual | ~CMyEllipsoid () |
A 2D ellipse or 3D ellipsoid, depending on the size of the m_cov matrix (2x2 or 3x3). The center of the ellipsoid is the "m_x,m_y,m_z" object's coordinates. In the case of a 2D ellipse it will be drawn in the XY plane, for z=0. The color is determined by the RGBA fields in the class "CRenderizable". Note that a transparent ellipsoid can be drawn for "0<alpha<1" values. If one of the eigen value of the covariance matrix of the ellipsoid is null, ellipsoid will not be rendered.
Please read the documentation of CGeneralizedEllipsoidTemplate::setQuantiles() for learning the mathematical details about setting the desired confidence interval.
Definition at line 64 of file CMyEllipsoid.h.
mrpt::opengl::CMyEllipsoid::CMyEllipsoid | ( | ) | [inline, private] |
Constructor
Definition at line 124 of file CMyEllipsoid.h.
virtual mrpt::opengl::CMyEllipsoid::~CMyEllipsoid | ( | ) | [inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers
Definition at line 134 of file CMyEllipsoid.h.
CObject* mrpt::opengl::CMyEllipsoid::duplicate | ( | ) | [inline] |
Definition at line 120 of file CMyEllipsoid.h.
void mrpt::opengl::CMyEllipsoid::enableDrawSolid3D | ( | bool | v | ) | [inline] |
If set to true (default), a whole ellipsoid surface will be drawn, or if set to "false" it will be drawn as a "wireframe".
Definition at line 100 of file CMyEllipsoid.h.
virtual void mrpt::opengl::CMyEllipsoid::getBoundingBox | ( | mrpt::math::TPoint3D & | , |
mrpt::math::TPoint3D & | |||
) | const [inline, virtual] |
Definition at line 119 of file CMyEllipsoid.h.
mrpt::math::CMatrixDouble mrpt::opengl::CMyEllipsoid::getCovMatrix | ( | ) | const [inline] |
Definition at line 98 of file CMyEllipsoid.h.
float mrpt::opengl::CMyEllipsoid::getLineWidth | ( | ) | const [inline] |
Definition at line 108 of file CMyEllipsoid.h.
float mrpt::opengl::CMyEllipsoid::getQuantiles | ( | ) | const [inline] |
Definition at line 102 of file CMyEllipsoid.h.
void CMyEllipsoid::render_dl | ( | ) | const |
Render If one of the eigen value of the covariance matrix of the ellipsoid is null, ellipsoid will not be rendered to ensure stability in the rendering process.
Definition at line 50 of file CMyEllipsoid.cpp.
void mrpt::opengl::CMyEllipsoid::set2DsegmentsCount | ( | unsigned int | N | ) | [inline] |
The number of segments of a 2D ellipse (default=20)
Definition at line 104 of file CMyEllipsoid.h.
void mrpt::opengl::CMyEllipsoid::set3DsegmentsCount | ( | unsigned int | N | ) | [inline] |
The number of segments of a 3D ellipse (in both "axis") (default=20)
Definition at line 105 of file CMyEllipsoid.h.
void CMyEllipsoid::setCovMatrix | ( | const mrpt::math::CMatrixDouble & | m, |
int | resizeToSize = -1 |
||
) |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size)
Definition at line 256 of file CMyEllipsoid.cpp.
void CMyEllipsoid::setCovMatrix | ( | const mrpt::math::CMatrixFloat & | m, |
int | resizeToSize = -1 |
||
) |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size).
Definition at line 294 of file CMyEllipsoid.cpp.
void mrpt::opengl::CMyEllipsoid::setCovMatrix | ( | const mrpt::math::CMatrixFixedNumeric< T, 3, 3 > & | m, |
int | resizeToSize = -1 |
||
) | [inline] |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size)
Definition at line 87 of file CMyEllipsoid.h.
void mrpt::opengl::CMyEllipsoid::setCovMatrix | ( | const mrpt::math::CMatrixFixedNumeric< T, 2, 2 > & | m | ) | [inline] |
Set the 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid (if resizeToSize>0, the matrix will be cut to the square matrix of the given size)
Definition at line 94 of file CMyEllipsoid.h.
void mrpt::opengl::CMyEllipsoid::setLineWidth | ( | float | w | ) | [inline] |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1)
Definition at line 107 of file CMyEllipsoid.h.
void mrpt::opengl::CMyEllipsoid::setQuantiles | ( | float | q | ) | [inline] |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3)
Definition at line 101 of file CMyEllipsoid.h.
bool CMyEllipsoid::traceRay | ( | const mrpt::poses::CPose3D & | o, |
double & | dist | ||
) | const [virtual] |
Ray tracing
Definition at line 231 of file CMyEllipsoid.cpp.
unsigned int mrpt::opengl::CMyEllipsoid::m_2D_segments [protected] |
The number of segments of a 2D ellipse (default=20)
Definition at line 76 of file CMyEllipsoid.h.
unsigned int mrpt::opengl::CMyEllipsoid::m_3D_segments [protected] |
The number of segments of a 3D ellipse (in both "axis") (default=20)
Definition at line 77 of file CMyEllipsoid.h.
math::CMatrixD mrpt::opengl::CMyEllipsoid::m_cov [protected] |
The 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid.
Definition at line 73 of file CMyEllipsoid.h.
bool mrpt::opengl::CMyEllipsoid::m_drawSolid3D [protected] |
If set to true (default), a whole ellipsoid surface will be drawn, or if set to "false" it will be drawn as a "wireframe".
Definition at line 74 of file CMyEllipsoid.h.
math::CMatrixD mrpt::opengl::CMyEllipsoid::m_eigVal [protected] |
Used to store computed values the first time this is rendered, and to avoid recomputing them again.
Definition at line 71 of file CMyEllipsoid.h.
math::CMatrixD mrpt::opengl::CMyEllipsoid::m_eigVec [protected] |
Definition at line 71 of file CMyEllipsoid.h.
float mrpt::opengl::CMyEllipsoid::m_lineWidth [protected] |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1)
Definition at line 78 of file CMyEllipsoid.h.
math::CMatrixD mrpt::opengl::CMyEllipsoid::m_prevComputedCov [protected] |
Definition at line 71 of file CMyEllipsoid.h.
float mrpt::opengl::CMyEllipsoid::m_quantiles [protected] |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3)
Definition at line 75 of file CMyEllipsoid.h.