Class CSetOfTriangles
Defined in File CSetOfTriangles.h
Inheritance Relationships
Base Types
public mrpt::viz::CVisualObject(Class CVisualObject)public mrpt::viz::VisualObjectParams_Triangles(Class VisualObjectParams_Triangles)
Class Documentation
-
class CSetOfTriangles : public virtual mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_Triangles
A set of colored triangles, able to draw any solid, arbitrarily complex object without textures. For textures, see CSetOfTexturedTriangles
See also
opengl::Scene, CSetOfTexturedTriangles
Public Types
Public Functions
-
void updatePolygons() const
Explicitly updates the internal polygon cache, with all triangles as polygons.
See also
-
void clearTriangles()
Clear this object, removing all triangles.
-
size_t getTrianglesCount() const
Get triangle count
-
template<class InputIterator>
inline void insertTriangles(const InputIterator &begin, const InputIterator &end) Inserts a set of triangles, bounded by iterators, into this set.
See also
-
void insertTriangles(const CSetOfTriangles::Ptr &p)
Inserts an existing CSetOfTriangles into this one
-
inline void reserve(size_t t)
Reserves memory for certain number of triangles, avoiding multiple memory allocation calls.
-
virtual CVisualObject &setColor_u8(const mrpt::img::TColor &c) override
Overwrite all triangles colors with the one provided
-
virtual CVisualObject &setColorA_u8(const uint8_t a) override
Overwrite all triangles colors with the one provided
-
virtual bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
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 getPolygons(std::vector<mrpt::math::TPolygon3D> &polys) const
Gets the polygon cache.
See also
-
template<class CONTAINER>
inline void insertTriangles(const CONTAINER &c) Inserts a set of triangles, given in a container of either TTriangle’s or TPolygon3D
See also
-
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of the object parent.
-
CSetOfTriangles() = default
-
virtual ~CSetOfTriangles() override = default
-
void updatePolygons() const