Go to the documentation of this file.
10 #ifndef opengl_CMesh3D_H
11 #define opengl_CMesh3D_H
15 #include <Eigen/Dense>
43 typedef
int f_verts[4];
44 typedef
float coord3D[3];
48 bool m_enableTransparency;
53 bool m_computeNormals;
58 unsigned int m_num_verts;
59 unsigned int m_num_faces;
61 f_verts *m_face_verts;
62 coord3D *m_vert_coords;
87 void loadMesh(
unsigned int num_verts,
unsigned int num_faces,
int *verts_per_face,
int *face_verts,
float *vert_coords);
97 void loadMesh(
unsigned int num_verts,
unsigned int num_faces,
const Array<bool, 1, Dynamic> &is_quad,
const Array<int, 4, Dynamic> &face_verts,
const Array<float, 3, Dynamic> &vert_coords);
108 static CMesh3DPtr
Create(
bool enableTransparency,
bool enableShowEdges,
bool enableShowFaces,
bool enableShowVertices);
122 CMesh3D(
bool enableTransparency = false,
bool antiAliasing = false,
bool enableShowEdges = true,
bool enableShowFaces = true,
bool enableShowVertices = false) :
123 m_enableTransparency(enableTransparency),
124 m_antiAliasing(antiAliasing),
125 m_showEdges(enableShowEdges),
126 m_showFaces(enableShowFaces),
127 m_showVertices(enableShowVertices),
128 m_computeNormals(true),
133 m_color.R = 1.f; m_color.G = 0.f; m_color.B = 0.f; m_color.A = 1.f;
134 edge_color[0] = 0.9f; edge_color[1] = 0.9f; edge_color[2] = 0.9f; edge_color[3] = 1.f;
135 face_color[0] = 0.7f; face_color[1] = 0.7f; face_color[2] = 0.8f; face_color[3] = 1.f;
136 vert_color[0] = 0.3f; vert_color[1] = 0.3f; vert_color[2] = 0.3f; vert_color[3] = 1.f;
void enableFaceNormals(bool v)
TColormap
Different colormaps.
A renderizable object suitable for rendering with OpenGL's display lists.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void enableShowVertices(bool v)
virtual ~CMesh3D()
Private, virtual destructor: only can be deleted from smart pointers.
void enableShowFaces(bool v)
void setVertColor(float r, float g, float b, float a=1.f)
A 3D mesh composed of Triangles and/or Quads.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
void loadMesh(unsigned int num_verts, unsigned int num_faces, const Array< bool, 1, Dynamic > &is_quad, const Array< int, 4, Dynamic > &face_verts, const Array< float, 3, Dynamic > &vert_coords)
Load a 3D mesh.
void loadMesh(unsigned int num_verts, unsigned int num_faces, int *verts_per_face, int *face_verts, float *vert_coords)
Load a 3D mesh.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setLineWidth(float lw)
void setPointSize(float ps)
void setEdgeColor(float r, float g, float b, float a=1.f)
void enableShowEdges(bool v)
void render_dl() const MRPT_OVERRIDE
Render.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
void setFaceColor(float r, float g, float b, float a=1.f)
static CMesh3DPtr Create(bool enableTransparency, bool enableShowEdges, bool enableShowFaces, bool enableShowVertices)
Class factory.
void enableAntiAliasing(bool v)
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |