class mrpt::viz::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/viz/CSetOfTexturedTriangles.h> class CSetOfTexturedTriangles: public mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_TexturedTriangles { public: // typedefs typedef mrpt::viz::TTriangle::Vertex TVertex; typedef mrpt::viz::TTriangle TTriangle; // construction CSetOfTexturedTriangles(); // methods 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; void assignImage(const mrpt::img::CImage& img); };
Inherited Members
public: // structs struct OutdatedState; struct State; // methods const auto& shaderTexturedTrianglesBuffer() const; auto& shaderTexturedTrianglesBufferMutex() const; bool isLightEnabled() const; void enableLight(bool enable = true); TCullFace cullFaces() const; const mrpt::img::CImage& getTextureImage() const; const mrpt::img::CImage& getTextureAlphaImage() const; bool textureImageHasBeenAssigned() const; bool textureLinearInterpolation() const; void enableTextureMipMap(bool enable); bool textureMipMap() const;
Methods
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
void assignImage(const mrpt::img::CImage& img)
Assigns a texture image, and disable transparency.
Images are copied, the original ones can be deleted.