10 #ifndef opengl_CMesh3D_H 11 #define opengl_CMesh3D_H 15 #include <Eigen/Dense> 124 unsigned int num_verts,
unsigned int num_faces,
int* verts_per_face,
125 int* face_verts,
float* vert_coords);
141 unsigned int num_verts,
unsigned int num_faces,
142 const Array<bool, 1, Dynamic>& is_quad,
143 const Array<int, 4, Dynamic>& face_verts,
144 const Array<float, 3, Dynamic>& vert_coords);
mrpt::utils::TColormap m_colorMap
void setLineWidth(float lw)
TColormap
Different colormaps for use in mrpt::utils::colormap()
unsigned int m_num_verts
Number of vertices of the mesh.
void render_dl() const override
Render.
float face_color[4]
Color of the faces (when shown)
std::shared_ptr< CMesh3D > Ptr
void enableTransparency(bool v)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
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
static Ptr Create(Args &&... args)
void setVertColor(float r, float g, float b, float a=1.f)
CMesh3D(bool enableTransparency=false, bool antiAliasing=false, bool enableShowEdges=true, bool enableShowFaces=true, bool enableShowVertices=false)
Constructor.
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)
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
virtual ~CMesh3D()
Private, virtual destructor: only can be deleted from smart pointers.
void enableShowFaces(bool v)
bool * m_is_quad
Pointer storing whether a face is a quad (1) or a triangle (0)
coord3D * m_normals
Pointer storing the face normals.
float vert_color[4]
Color of the vertices (when shown)
void setEdgeColor(float r, float g, float b, float a=1.f)
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
void enableShowVertices(bool v)
coord3D * m_vert_coords
Pointer storing the coordinates of the vertices.
f_verts * m_face_verts
Pointer storing the vertices that compose each face.
float edge_color[4]
Color of the edges (when shown)