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.
Definition at line 58 of file CEllipsoid.h.
#include <mrpt/opengl/CEllipsoid.h>
Public Member Functions | |
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) |
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, 2, 2 > &m) |
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) | |
mrpt::math::CMatrixDouble | getCovMatrix () const |
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". | |
void | setQuantiles (float q) |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3) | |
float | getQuantiles () 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 | setLineWidth (float w) |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1) | |
float | getLineWidth () const |
void | 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. | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
Ray tracing. | |
Protected Attributes | |
math::CMatrixD | m_eigVal |
Used to store computed values the first time this is rendered, and to avoid recomputing them again. | |
math::CMatrixD | m_eigVec |
math::CMatrixD | m_prevComputedCov |
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". | |
float | m_quantiles |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3) | |
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) | |
float | m_lineWidth |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1) | |
Private Member Functions | |
CEllipsoid () | |
Constructor. | |
virtual | ~CEllipsoid () |
Private, virtual destructor: only can be deleted from smart pointers. | |
RTTI stuff | |
typedef CEllipsoidPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CEllipsoid |
static mrpt::utils::TRuntimeClassId | classCEllipsoid |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. | |
static mrpt::utils::CObject * | CreateObject () |
static CEllipsoidPtr | Create () |
A typedef for the associated smart pointer
Definition at line 60 of file CEllipsoid.h.
mrpt::opengl::CEllipsoid::CEllipsoid | ( | ) | [inline, private] |
Constructor.
Definition at line 117 of file CEllipsoid.h.
virtual mrpt::opengl::CEllipsoid::~CEllipsoid | ( | ) | [inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
Definition at line 127 of file CEllipsoid.h.
static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CEllipsoid::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
static CEllipsoidPtr mrpt::opengl::CEllipsoid::Create | ( | ) | [static] |
static mrpt::utils::CObject* mrpt::opengl::CEllipsoid::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::opengl::CEllipsoid::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
void mrpt::opengl::CEllipsoid::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 94 of file CEllipsoid.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
mrpt::math::CMatrixDouble mrpt::opengl::CEllipsoid::getCovMatrix | ( | ) | const [inline] |
Definition at line 92 of file CEllipsoid.h.
float mrpt::opengl::CEllipsoid::getLineWidth | ( | ) | const [inline] |
Definition at line 102 of file CEllipsoid.h.
float mrpt::opengl::CEllipsoid::getQuantiles | ( | ) | const [inline] |
Definition at line 96 of file CEllipsoid.h.
virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CEllipsoid::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
void mrpt::opengl::CEllipsoid::render_dl | ( | ) | const [virtual] |
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.
Implements mrpt::opengl::CRenderizableDisplayList.
void mrpt::opengl::CEllipsoid::set2DsegmentsCount | ( | unsigned int | N | ) | [inline] |
The number of segments of a 2D ellipse (default=20)
Definition at line 98 of file CEllipsoid.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CEllipsoid::set3DsegmentsCount | ( | unsigned int | N | ) | [inline] |
The number of segments of a 3D ellipse (in both "axis") (default=20)
Definition at line 99 of file CEllipsoid.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CEllipsoid::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).
void mrpt::opengl::CEllipsoid::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 mrpt::opengl::CEllipsoid::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 81 of file CEllipsoid.h.
void mrpt::opengl::CEllipsoid::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 88 of file CEllipsoid.h.
void mrpt::opengl::CEllipsoid::setLineWidth | ( | float | w | ) | [inline] |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1)
Definition at line 101 of file CEllipsoid.h.
void mrpt::opengl::CEllipsoid::setQuantiles | ( | float | q | ) | [inline] |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3)
Definition at line 95 of file CEllipsoid.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
virtual bool mrpt::opengl::CEllipsoid::traceRay | ( | const mrpt::poses::CPose3D & | o, |
double & | dist | ||
) | const [virtual] |
Ray tracing.
Reimplemented from mrpt::opengl::CRenderizable.
mrpt::utils::CLASSINIT mrpt::opengl::CEllipsoid::_init_CEllipsoid [static, protected] |
Definition at line 60 of file CEllipsoid.h.
Definition at line 60 of file CEllipsoid.h.
const mrpt::utils::TRuntimeClassId* mrpt::opengl::CEllipsoid::classinfo [static] |
Definition at line 60 of file CEllipsoid.h.
unsigned int mrpt::opengl::CEllipsoid::m_2D_segments [protected] |
The number of segments of a 2D ellipse (default=20)
Definition at line 70 of file CEllipsoid.h.
unsigned int mrpt::opengl::CEllipsoid::m_3D_segments [protected] |
The number of segments of a 3D ellipse (in both "axis") (default=20)
Definition at line 71 of file CEllipsoid.h.
math::CMatrixD mrpt::opengl::CEllipsoid::m_cov [protected] |
The 2x2 or 3x3 covariance matrix that will determine the aspect of the ellipsoid.
Definition at line 67 of file CEllipsoid.h.
bool mrpt::opengl::CEllipsoid::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 68 of file CEllipsoid.h.
math::CMatrixD mrpt::opengl::CEllipsoid::m_eigVal [protected] |
Used to store computed values the first time this is rendered, and to avoid recomputing them again.
Definition at line 65 of file CEllipsoid.h.
math::CMatrixD mrpt::opengl::CEllipsoid::m_eigVec [protected] |
Definition at line 65 of file CEllipsoid.h.
float mrpt::opengl::CEllipsoid::m_lineWidth [protected] |
The line width for 2D ellipses or 3D wireframe ellipsoids (default=1)
Definition at line 72 of file CEllipsoid.h.
Definition at line 65 of file CEllipsoid.h.
float mrpt::opengl::CEllipsoid::m_quantiles [protected] |
The number of "sigmas" for drawing the ellipse/ellipsoid (default=3)
Definition at line 69 of file CEllipsoid.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011 |