#include <mrpt/opengl/CMesh.h>
Public Member Functions | |
void | setGridLimits (float xmin, float xmax, float ymin, float ymax) |
void | getGridLimits (float &xmin, float &xmax, float &ymin, float &ymax) const |
void | enableTransparency (bool v) |
void | enableWireFrame (bool v) |
void | enableColorFromZ (bool v, mrpt::vision::TColormap colorMap=mrpt::vision::cmJET) |
void | setZ (const mrpt::math::CMatrixTemplateNumeric< float > &in_Z) |
This method sets the matrix of heights for each position (cell) in the mesh grid. | |
void | getZ (mrpt::math::CMatrixFloat &out) const |
Returns a reference to the internal Z matrix, allowing changing it efficiently. | |
void | getMask (mrpt::math::CMatrixFloat &out) const |
Returns a reference to the internal mask matrix, allowing changing it efficiently. | |
void | setMask (const mrpt::math::CMatrixTemplateNumeric< float > &in_mask) |
This method sets the boolean mask of valid heights for each position (cell) in the mesh grid. | |
void | setUV (const mrpt::math::CMatrixTemplateNumeric< float > &in_U, const mrpt::math::CMatrixTemplateNumeric< float > &in_V) |
Sets the (u,v) texture coordinates (in range [0,1]) for each cell. | |
float | getXMin () const |
float | getXMax () const |
float | getYMin () const |
float | getYMax () const |
void | setXMin (const float &nxm) |
void | setXMax (const float &nxm) |
void | setYMin (const float &nym) |
void | setYMax (const float &nym) |
void | getXBounds (float &min, float &max) const |
void | getYBounds (float &min, float &max) const |
void | setXBounds (const float &min, const float &max) |
void | setYBounds (const float &min, const float &max) |
void | render () const |
Render. | |
void | assignImage (const utils::CMRPTImage &img) |
Assigns a texture image, and disable transparency. | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, float &dist) const |
Trace ray. | |
Static Public Member Functions | |
static CMeshPtr | Create (bool enableTransparency=false, float xMin=0.0f, float xMax=0.0f, float yMin=0.0f, float yMax=0.0f) |
Class factory. | |
Protected Member Functions | |
void | updateColorsMatrix () const |
Called internally to assure C is updated. | |
void | updateTriangles () const |
Called internally to assure the triangle list is updated. | |
Protected Attributes | |
mrpt::utils::CMRPTImage | m_textureImage |
bool | m_enableTransparency |
bool | m_colorFromZ |
bool | m_isWireFrame |
math::CMatrix | Z |
Z(x,y): Z-coordinate of the point (x,y). | |
math::CMatrix | mask |
math::CMatrix | U |
math::CMatrix | V |
Texture coordinates. | |
math::CMatrix | C |
Color [0,1] for each cell, updated by updateColorsMatrix. | |
mrpt::vision::TColormap | m_colorMap |
Used when m_colorFromZ is true. | |
bool | m_modified_Z |
Whether C is not up-to-date wrt to Z. | |
float | xMin |
float | xMax |
float | yMin |
float | yMax |
Mesh bounds. | |
std::vector < CSetOfTriangles::TTriangle > | actualMesh |
List of triangles in the mesh. | |
bool | trianglesUpToDate |
Whether the actual mesh needs to be recalculated. | |
Private Member Functions | |
CMesh (bool enableTransparency=false, float xMin=0.0f, float xMax=0.0f, float yMin=0.0f, float yMax=0.0f) | |
Constructor. | |
virtual | ~CMesh () |
Private, virtual destructor: only can be deleted from smart pointers. |
This class can be used to draw any solid, arbitrarily complex object (without textures).
Definition at line 51 of file CMesh.h.
mrpt::opengl::CMesh::CMesh | ( | bool | enableTransparency = false , |
|
float | xMin = 0.0f , |
|||
float | xMax = 0.0f , |
|||
float | yMin = 0.0f , |
|||
float | yMax = 0.0f | |||
) | [inline, private] |
virtual mrpt::opengl::CMesh::~CMesh | ( | ) | [inline, private, virtual] |
void mrpt::opengl::CMesh::assignImage | ( | const utils::CMRPTImage & | img | ) |
Assigns a texture image, and disable transparency.
static CMeshPtr mrpt::opengl::CMesh::Create | ( | bool | enableTransparency = false , |
|
float | xMin = 0.0f , |
|||
float | xMax = 0.0f , |
|||
float | yMin = 0.0f , |
|||
float | yMax = 0.0f | |||
) | [inline, static] |
void mrpt::opengl::CMesh::enableColorFromZ | ( | bool | v, | |
mrpt::vision::TColormap | colorMap = mrpt::vision::cmJET | |||
) | [inline] |
void mrpt::opengl::CMesh::enableTransparency | ( | bool | v | ) | [inline] |
void mrpt::opengl::CMesh::enableWireFrame | ( | bool | v | ) | [inline] |
void mrpt::opengl::CMesh::getGridLimits | ( | float & | xmin, | |
float & | xmax, | |||
float & | ymin, | |||
float & | ymax | |||
) | const [inline] |
void mrpt::opengl::CMesh::getMask | ( | mrpt::math::CMatrixFloat & | out | ) | const [inline] |
void mrpt::opengl::CMesh::getXBounds | ( | float & | min, | |
float & | max | |||
) | const [inline] |
void mrpt::opengl::CMesh::getYBounds | ( | float & | min, | |
float & | max | |||
) | const [inline] |
void mrpt::opengl::CMesh::getZ | ( | mrpt::math::CMatrixFloat & | out | ) | const [inline] |
void mrpt::opengl::CMesh::render | ( | ) | const [virtual] |
void mrpt::opengl::CMesh::setGridLimits | ( | float | xmin, | |
float | xmax, | |||
float | ymin, | |||
float | ymax | |||
) | [inline] |
void mrpt::opengl::CMesh::setMask | ( | const mrpt::math::CMatrixTemplateNumeric< float > & | in_mask | ) |
This method sets the boolean mask of valid heights for each position (cell) in the mesh grid.
void mrpt::opengl::CMesh::setUV | ( | const mrpt::math::CMatrixTemplateNumeric< float > & | in_U, | |
const mrpt::math::CMatrixTemplateNumeric< float > & | in_V | |||
) |
Sets the (u,v) texture coordinates (in range [0,1]) for each cell.
void mrpt::opengl::CMesh::setXBounds | ( | const float & | min, | |
const float & | max | |||
) | [inline] |
void mrpt::opengl::CMesh::setXMax | ( | const float & | nxm | ) | [inline] |
void mrpt::opengl::CMesh::setXMin | ( | const float & | nxm | ) | [inline] |
void mrpt::opengl::CMesh::setYBounds | ( | const float & | min, | |
const float & | max | |||
) | [inline] |
void mrpt::opengl::CMesh::setYMax | ( | const float & | nym | ) | [inline] |
void mrpt::opengl::CMesh::setYMin | ( | const float & | nym | ) | [inline] |
void mrpt::opengl::CMesh::setZ | ( | const mrpt::math::CMatrixTemplateNumeric< float > & | in_Z | ) |
This method sets the matrix of heights for each position (cell) in the mesh grid.
virtual bool mrpt::opengl::CMesh::traceRay | ( | const mrpt::poses::CPose3D & | o, | |
float & | dist | |||
) | const [virtual] |
void mrpt::opengl::CMesh::updateColorsMatrix | ( | ) | const [protected] |
Called internally to assure C is updated.
void mrpt::opengl::CMesh::updateTriangles | ( | ) | const [protected] |
Called internally to assure the triangle list is updated.
std::vector<CSetOfTriangles::TTriangle> mrpt::opengl::CMesh::actualMesh [mutable, protected] |
math::CMatrix mrpt::opengl::CMesh::C [mutable, protected] |
bool mrpt::opengl::CMesh::m_colorFromZ [protected] |
bool mrpt::opengl::CMesh::m_enableTransparency [protected] |
bool mrpt::opengl::CMesh::m_isWireFrame [protected] |
bool mrpt::opengl::CMesh::m_modified_Z [mutable, protected] |
math::CMatrix mrpt::opengl::CMesh::mask [protected] |
bool mrpt::opengl::CMesh::trianglesUpToDate [mutable, protected] |
math::CMatrix mrpt::opengl::CMesh::U [protected] |
math::CMatrix mrpt::opengl::CMesh::V [protected] |
float mrpt::opengl::CMesh::xMax [protected] |
float mrpt::opengl::CMesh::xMin [protected] |
float mrpt::opengl::CMesh::yMax [protected] |
float mrpt::opengl::CMesh::yMin [protected] |
math::CMatrix mrpt::opengl::CMesh::Z [protected] |
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:18:33 EST 2009 |