120 unsigned int num_verts,
unsigned int num_faces,
int* verts_per_face,
121 int* face_verts,
float* vert_coords);
137 unsigned int num_verts,
unsigned int num_faces,
void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
TColormap
Different colormaps for use in mrpt::img::colormap()
void setLineWidth(float lw)
unsigned int m_num_verts
Number of vertices of the mesh.
void render_dl() const override
Render.
std::vector< coord3D > m_vert_coords
Pointer storing the coordinates of the vertices.
float face_color[4]
Color of the faces (when shown)
void enableTransparency(bool v)
std::vector< f_verts > m_face_verts
Pointer storing the vertices that compose each face.
void setPointSize(float ps)
A 3D mesh composed of Triangles and/or Quads.
void enableShowEdges(bool v)
A renderizable object suitable for rendering with OpenGL's display lists.
bool m_enableTransparency
void setVertColor(float r, float g, float b, float a=1.f)
Lightweight 3D point (float version).
CMesh3D(bool enableTransparency=false, bool antiAliasing=false, bool enableShowEdges=true, bool enableShowFaces=true, bool enableShowVertices=false)
Constructor.
std::vector< coord3D > m_normals
Pointer storing the face normals.
void loadMesh(unsigned int num_verts, unsigned int num_faces, int *verts_per_face, int *face_verts, float *vert_coords)
Load a 3D mesh.
unsigned int m_num_faces
Number of faces of the mesh.
void enableAntiAliasing(bool v)
void setFaceColor(float r, float g, float b, float a=1.f)
void enableFaceNormals(bool v)
mrpt::img::TColormap m_colorMap
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...
GLdouble GLdouble GLdouble r
~CMesh3D() override
Private, virtual destructor: only can be deleted from smart pointers.
std::vector< bool > m_is_quad
Pointer storing whether a face is a quad (1) or a triangle (0)
void enableShowFaces(bool v)
The namespace for 3D scene representation and rendering.
float vert_color[4]
Color of the vertices (when shown)
void setEdgeColor(float r, float g, float b, float a=1.f)
This template class provides the basic functionality for a general 2D any-size, resizable container o...
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...
GLubyte GLubyte GLubyte a
std::array< int, 4 > f_verts
void enableShowVertices(bool v)
float edge_color[4]
Color of the edges (when shown)