class mrpt::opengl::CSetOfTexturedTriangles
Overview
A set of textured triangles.
This class can be used to draw any solid, arbitrarily complex object with textures.
See also:
#include <mrpt/opengl/CSetOfTexturedTriangles.h> class CSetOfTexturedTriangles: public mrpt::opengl::CRenderizableShaderTexturedTriangles { public: // typedefs typedef mrpt::opengl::TTriangle::Vertex TVertex; typedef mrpt::opengl::TTriangle TTriangle; // construction CSetOfTexturedTriangles(); // methods virtual void onUpdateBuffers_TexturedTriangles(); virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const; void clearTriangles(); size_t getTrianglesCount() const; TTriangle getTriangle(size_t idx) const; void getTriangle( size_t idx, TTriangle& t ) const; void insertTriangle(const TTriangle& t); virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const; TCullFace cullFaces() const; };
Inherited Members
public: // structs struct OutdatedState; struct RenderContext; struct State; // methods virtual void render(const RenderContext& rc) const = 0; virtual void renderUpdateBuffers() const = 0; virtual shader_list_t requiredShaders() const; virtual void freeOpenGLResources() = 0; virtual shader_list_t requiredShaders() const; virtual void render(const RenderContext& rc) const; virtual void renderUpdateBuffers() const; virtual void onUpdateBuffers_TexturedTriangles() = 0; virtual void freeOpenGLResources(); void assignImage(const mrpt::img::CImage& img);
Methods
virtual void onUpdateBuffers_TexturedTriangles()
Must be implemented in derived classes to update the geometric entities to be drawn in “m_*_buffer” fields.
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const
Evaluates the bounding box of this object (including possible children) in the coordinate frame of the object parent.
virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const
Simulation of ray-trace, given a pose.
Returns true if the ray effectively collisions with the object (returning the distance to the origin of the ray in “dist”), or false in other case. “dist” variable yields undefined behaviour when false is returned