52 float xMax_p = 1.0f,
float yMin_p = -1.0f,
float yMax_p = 1.0f)
83 void getGridLimits(
float& xmin,
float& xmax,
float& ymin,
float& ymax)
const 184 const float ycenter = 0.5f * (
yMin +
yMax);
188 yMax = ycenter + 0.5f * newratio * xwidth;
189 yMin = ycenter - 0.5f * newratio * xwidth;
void updateColorsMatrix() const
Called internally to assure C is updated.
TColormap
Different colormaps for use in mrpt::img::colormap()
void enableColorFromZ(bool v, mrpt::img::TColormap colorMap=mrpt::img::cmJET)
void setYBounds(float min, float max)
void setXBounds(float min, float max)
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
A planar (XY) grid where each cell has an associated height and, optionally, a texture map...
void assignImageAndZ(const mrpt::img::CImage &img, const mrpt::math::CMatrixDynamic< float > &in_Z)
Assigns a texture image and Z simultaneously, and disable transparency.
math::CMatrixF Z
Z(x,y): Z-coordinate of the point (x,y)
size_t getHeight() const override
Returns the height of the image in pixels.
mrpt::img::TColormap m_colorMap
Used when m_colorFromZ is true.
virtual ~CMeshFast() override=default
bool m_modified_Z
Whether C is not up-to-date wrt to Z.
math::CMatrix_u8 C
Grayscale or RGB components [0,255] for each cell, updated by updateColorsMatrix. ...
bool m_modified_Image
Whether C is not up-to-date wrt to the texture image.
void getYBounds(float &min, float &max) const
#define ASSERT_(f)
Defines an assertion mechanism.
size_t getWidth() const override
Returns the width of the image in pixels.
void getGridLimits(float &xmin, float &xmax, float &ymin, float &ymax) const
bool pointsUpToDate
Whether the coordinates of the points needs to be recalculated.
bool m_enableTransparency
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
void setZ(const mrpt::math::CMatrixDynamic< float > &in_Z)
This method sets the matrix of heights for each position (cell) in the mesh grid. ...
void onUpdateBuffers_Points() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
Renderizable generic renderer for objects using the points shader.
mrpt::img::TColor m_color
Color components in the range [0,255].
This class is a "CSerializable" wrapper for "CMatrixFloat".
math::CMatrixF Y
Y(x,y): Y-coordinate of the point (x,y)
void enableTransparency(bool v)
void adjustGridToImageAR()
Adjust grid limits according to the image aspect ratio, maintaining the X limits and resizing in the ...
mrpt::vision::TStereoCalibResults out
void updatePoints() const
The namespace for 3D scene representation and rendering.
math::CMatrixF X
X(x,y): X-coordinate of the point (x,y)
CMeshFast(bool enableTransparency=false, float xMin_p=-1.0f, float xMax_p=1.0f, float yMin_p=-1.0f, float yMax_p=1.0f)
Constructor.
void setGridLimits(float xmin, float xmax, float ymin, float ymax)
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
mrpt::img::CImage m_textureImage
This template class provides the basic functionality for a general 2D any-size, resizable container o...
void assignImage(const mrpt::img::CImage &img)
Assigns a texture image, and disable transparency.
void getZ(mrpt::math::CMatrixFloat &out) const
Returns a reference to the internal Z matrix, allowing changing it efficiently.
A class for storing images as grayscale or RGB bitmaps.
void getXBounds(float &min, float &max) const