29 #ifndef opengl_CMesh_H
30 #define opengl_CMesh_H
65 bool m_enableTransparency;
72 mutable math::CMatrix C;
76 mutable
bool m_modified_Z;
78 void updateColorsMatrix() const;
79 void updateTriangles() const;
80 void updatePolygons() const;
82 float xMin,xMax,yMin,yMax;
84 mutable
bool trianglesUpToDate;
85 mutable
bool polygonsUpToDate;
86 mutable std::vector<mrpt::math::TPolygonWithPlane> tmpPolys;
89 void setGridLimits(
float xmin,
float xmax,
float ymin,
float ymax)
91 xMin=xmin; xMax = xmax;
92 yMin=ymin; yMax = ymax;
96 void getGridLimits(
float &xmin,
float &xmax,
float &ymin,
float &ymax)
const
107 m_colorMap = colorMap;
171 static CMeshPtr Create(
bool enableTransparency,
float xMin = 0.0f,
float xMax = 0.0f,
float yMin = 0.0f,
float yMax = 0.0f )
173 return CMeshPtr(
new CMesh( enableTransparency, xMin ,xMax , yMin ,yMax ) );
178 void render_dl()
const;
191 CMesh(
bool enableTransparency =
false,
float xMin = 0.0f,
float xMax = 0.0f,
float yMin = 0.0f,
float yMax = 0.0f ) :
193 m_enableTransparency(enableTransparency),
195 m_isWireFrame(false),
196 Z(0,0), mask(0,0), U(0,0), V(0,0), C(0,0),
197 m_colorMap( mrpt::utils::
cmJET ),
199 xMin(xMin), xMax(xMax), yMin(yMin), yMax(yMax),
200 trianglesUpToDate(false)