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