mrpt::opengl::CMesh Class Reference
A set of connected colored triangles.
More...
#include <mrpt/opengl/CMesh.h>
List of all members.
|
Public Member Functions |
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.
|
mrpt::math::CMatrixFloat & | getZ () |
| Returns a reference to the internal Z matrix, allowing changing it efficiently.
|
mrpt::math::CMatrixFloat & | getMask () |
| 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.
|
void | render () |
| Render.
|
void | assignImage (const utils::CMRPTImage &img) |
| Assigns a texture image, and disable transparency.
|
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.
|
Public Attributes |
float | xMin |
float | xMax |
float | yMin |
float | yMax |
Protected Member Functions |
void | updateColorsMatrix () |
| Called internally to assure C 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.
|
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.
|
Detailed Description
A set of connected colored triangles.
This class can be used to draw any solid, arbitrarily complex object (without textures).
- See also:
- opengl::COpenGLScene
Definition at line 50 of file CMesh.h.
Constructor & Destructor Documentation
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] |
Constructor.
Definition at line 116 of file CMesh.h.
virtual mrpt::opengl::CMesh::~CMesh |
( |
|
) |
[inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
Definition at line 132 of file CMesh.h.
Member Function Documentation
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] |
Returns a reference to the internal mask matrix, allowing changing it efficiently.
Returns a reference to the internal Z matrix, allowing changing it efficiently.
void mrpt::opengl::CMesh::render |
( |
|
) |
[virtual] |
This method sets the boolean mask of valid heights for each position (cell) in the mesh grid.
Sets the (u,v) texture coordinates (in range [0,1]) for each cell.
This method sets the matrix of heights for each position (cell) in the mesh grid.
void mrpt::opengl::CMesh::updateColorsMatrix |
( |
|
) |
[protected] |
Called internally to assure C is updated.
Member Data Documentation
Color [0,1] for each cell, updated by updateColorsMatrix.
Definition at line 63 of file CMesh.h.
Used when m_colorFromZ is true.
Definition at line 65 of file CMesh.h.
Whether C is not up-to-date wrt to Z.
Definition at line 67 of file CMesh.h.
Texture coordinates.
Definition at line 62 of file CMesh.h.
Z(x,y): Z-coordinate of the point (x,y).
Definition at line 60 of file CMesh.h.