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:
opengl::Scene
#include <mrpt/viz/CSetOfTexturedTriangles.h> class CSetOfTexturedTriangles: public mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_TexturedTriangles { public: // typedefs typedef std::shared_ptr<mrpt::viz ::CSetOfTexturedTriangles> Ptr; typedef std::shared_ptr<const mrpt::viz ::CSetOfTexturedTriangles> ConstPtr; typedef std::unique_ptr<mrpt::viz ::CSetOfTexturedTriangles> UniquePtr; typedef std::unique_ptr<const mrpt::viz ::CSetOfTexturedTriangles> ConstUniquePtr; typedef mrpt::viz::TTriangle::Vertex TVertex; typedef mrpt::viz::TTriangle TTriangle; // fields static constexpr const char* className = "mrpt::viz" "::" "CSetOfTexturedTriangles"; // construction CSetOfTexturedTriangles(); // methods static constexpr auto getClassName(); static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); static std::shared_ptr<CObject> CreateObject(); template <typename... Args> static Ptr Create(Args&&... args); template <typename Alloc, typename... Args> static Ptr CreateAlloc( const Alloc& alloc, Args&&... args ); template <typename... Args> static UniquePtr CreateUnique(Args&&... args); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual mrpt::rtti::CObject* clone() const; 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: // typedefs typedef std::shared_ptr<CObject> Ptr; typedef std::shared_ptr<const CObject> ConstPtr; typedef std::shared_ptr<CSerializable> Ptr; typedef std::shared_ptr<const CSerializable> ConstPtr; // structs struct PoseAndScale; struct State; // methods static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; 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; const mrpt::img::CImage& getNormalMapImage() const; bool normalMapHasBeenAssigned() const; bool textureLinearInterpolation() const; void enableTextureMipMap(bool enable); bool textureMipMap() const;
Typedefs
typedef std::shared_ptr<mrpt::viz ::CSetOfTexturedTriangles> Ptr
A type for the associated smart pointer.
Methods
virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const
Returns information about the class of an object in runtime.
virtual mrpt::rtti::CObject* clone() const
Returns a deep copy (clone) of the object, indepently of its class.
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.