98 unsigned int num_verts,
unsigned int num_faces,
int* verts_per_face,
99 int* face_verts,
float* vert_coords);
115 unsigned int num_verts,
unsigned int num_faces,
A compile-time fixed-size numeric matrix container.
void setVertColor(float r, float g, float b, float a=1.f)
void freeOpenGLResources() override
Free opengl buffers.
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
Renderizable generic renderer for objects using the triangles shader.
void freeOpenGLResources() override
Free opengl buffers.
A 3D mesh composed of Triangles and/or Quads.
void enableShowEdges(bool v)
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
Context for calls to render()
std::vector< mrpt::math::TPoint3Df > m_normals
Pointer storing the face normals.
mrpt::img::TColorf vert_color
Color of the vertices.
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
void setEdgeColor(float r, float g, float b, float a=1.f)
void freeOpenGLResources() override
Free opengl buffers.
static constexpr shader_id_t WIREFRAME
void loadMesh(unsigned int num_verts, unsigned int num_faces, int *verts_per_face, int *face_verts, float *vert_coords)
Load a 3D mesh.
void setFaceColor(float r, float g, float b, float a=1.f)
Renderizable generic renderer for objects using the points shader.
static constexpr shader_id_t TRIANGLES
void onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void enableFaceNormals(bool v)
virtual ~CMesh3D() override
std::vector< bool > m_is_quad
Pointer storing whether a face is a quad (1) or a triangle (0)
Renderizable generic renderer for objects using the wireframe shader.
void onUpdateBuffers_Points() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void enableShowFaces(bool v)
An RGBA color - floats in the range [0,1].
The namespace for 3D scene representation and rendering.
mrpt::img::TColorf edge_color
Color of the edges.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void freeOpenGLResources() override
Free opengl buffers.
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
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...
std::vector< mrpt::math::TPoint3Df > m_vertices
Pointer storing the coordinates of the vertices.
std::vector< vertex_indices_t > m_face_verts
Pointer storing the vertices that compose each face.
void enableShowVertices(bool v)
mrpt::img::TColorf face_color
Color of the faces.
static constexpr shader_id_t POINTS