10 #ifndef opengl_CMeshFast_H 11 #define opengl_CMeshFast_H 109 void getGridLimits(
float& xmin,
float& xmax,
float& ymin,
float& ymax)
const 193 float yMin = -1.0f,
float yMax = 1.0f);
221 const float ycenter = 0.5 * (
yMin +
yMax);
225 yMax = ycenter + 0.5 * newratio * xwidth;
226 yMin = ycenter - 0.5 * newratio * xwidth;
234 float xMax_p = 1.0f,
float yMin_p = -1.0f,
float yMax_p = 1.0f)
void updateColorsMatrix() const
Called internally to assure C is updated.
virtual ~CMeshFast()
Private, virtual destructor: only can be deleted from smart pointers.
void setXMax(const float &nxm)
TColormap
Different colormaps for use in mrpt::img::colormap()
math::CMatrix C_r
Red Component of the Color [0,1] for each cell, updated by updateColorsMatrix.
void enableColorFromZ(bool v, mrpt::img::TColormap colorMap=mrpt::img::cmJET)
void setYBounds(const float &min, const float &max)
A planar (XY) grid where each cell has an associated height and, optionally, a texture map...
size_t getHeight() const override
Returns the height of the image in pixels.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
mrpt::img::TColormap m_colorMap
Used when m_colorFromZ is true.
void render_dl() const override
Render.
void setYMin(const float &nym)
bool m_modified_Z
Whether C is not up-to-date wrt to Z.
void setPointSize(float p)
By default is 1.0.
A renderizable object suitable for rendering with OpenGL's display lists.
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.
void assignImageAndZ(const mrpt::img::CImage &img, const mrpt::math::CMatrixTemplateNumeric< float > &in_Z)
Assigns a texture image and Z simultaneously, and disable transparency.
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.
math::CMatrix Z
Z(x,y): Z-coordinate of the point (x,y)
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::CMatrixTemplateNumeric< float > &in_Z)
This method sets the matrix of heights for each position (cell) in the mesh grid. ...
math::CMatrix Y
Y(x,y): Y-coordinate of the point (x,y)
math::CMatrix C_g
Green Component of the Color [0,1] for each cell, updated by updateColorsMatrix.
mrpt::img::TColor m_color
Color components in the range [0,255].
math::CMatrix X
X(x,y): X-coordinate of the point (x,y)
void disablePointSmooth()
void enablePointSmooth(bool enable=true)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
bool m_pointSmooth
Default: false.
void enableTransparency(bool v)
static Ptr Create(Args &&... args)
math::CMatrix C
Grayscale Color [0,1] for each cell, updated by updateColorsMatrix.
void adjustGridToImageAR()
Adjust grid limits according to the image aspect ratio, maintaining the X limits and resizing in the ...
void updatePoints() const
float m_pointSize
By default is 1.0.
void setXBounds(const float &min, const float &max)
The namespace for 3D scene representation and rendering.
A matrix of dynamic size.
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.
math::CMatrix C_b
Blue Component of the Color [0,1] for each cell, updated by updateColorsMatrix.
void setGridLimits(float xmin, float xmax, float ymin, float ymax)
float getPointSize() const
void setXMin(const float &nxm)
This class is a "CSerializable" wrapper for "CMatrixFloat".
mrpt::img::CImage m_textureImage
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
void setYMax(const float &nym)