Go to the documentation of this file.
33 std::vector<TTriangle>::const_reverse_iterator;
67 template <
class InputIterator>
105 void getPolygons(std::vector<mrpt::math::TPolygon3D>& polys)
const;
112 template <
class CONTAINER>
156 mutable std::vector<mrpt::math::TPolygonWithPlane>
m_polygons;
165 s->insertTriangles(t.begin(), t.end());
175 s->insertTriangle(t);
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
void insertTriangles(const InputIterator &begin, const InputIterator &end)
Inserts a set of triangles, bounded by iterators, into this set.
A set of colored triangles, able to draw any solid, arbitrarily complex object without textures.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
The base class of 3D objects that can be directly rendered through OpenGL.
CRenderizable & setColorR_u8(const uint8_t r) override
Overwrite all triangles colors with the one provided.
void onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
std::vector< TTriangle >::const_reverse_iterator const_reverse_iterator
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles.
const_iterator end() const
Gets the ending iterator to this object.
void insertTriangles(const CONTAINER &c)
Inserts a set of triangles, given in a container of either TTriangle's or TPolygon3D.
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...
void updatePolygons() const
Explicitly updates the internal polygon cache, with all triangles as polygons.
void insertTriangle(const TTriangle &t)
Inserts a triangle into the set.
void clearTriangles()
Clear this object, removing all triangles.
CRenderizable & setColor_u8(const mrpt::img::TColor &c) override
Overwrite all triangles colors with the one provided.
bool polygonsUpToDate
Mutable variable used to check whether polygons need to be recalculated.
CSetOfTriangles()=default
#define ASSERT_BELOW_(__A, __B)
CRenderizable & setColorB_u8(const uint8_t b) override
Overwrite all triangles colors with the one provided.
virtual ~CSetOfTriangles() override=default
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
CRenderizable & setColorA_u8(const uint8_t a) override
Overwrite all triangles colors with the one provided.
const_reverse_iterator rbegin() const
Gets the reverse beginning iterator to this object, which points to the last triangle.
COpenGLScene::Ptr & operator<<(COpenGLScene::Ptr &s, const CRenderizable::Ptr &r)
Inserts an openGL object into a scene.
CRenderizable & setColorG_u8(const uint8_t g) override
Overwrite all triangles colors with the one provided.
A triangle (float coordinates) with RGBA colors (u8) and UV (texture coordinates) for each vertex.
const_reverse_iterator rend() const
Gets the reverse ending iterator to this object, which points to the beginning of the actual set.
std::shared_ptr< mrpt::opengl ::CSetOfTriangles > Ptr
Renderizable generic renderer for objects using the triangles shader.
size_t getTrianglesCount() const
Get triangle count.
void getPolygons(std::vector< mrpt::math::TPolygon3D > &polys) const
Gets the polygon cache.
The namespace for 3D scene representation and rendering.
std::vector< TTriangle >::const_iterator const_iterator
void reserve(size_t t)
Reserves memory for certain number of triangles, avoiding multiple memory allocation calls.
const_iterator begin() const
Gets the beginning iterator to this object.
void getTriangle(size_t idx, TTriangle &t) const
Gets the i-th triangle.
std::vector< mrpt::math::TPolygonWithPlane > m_polygons
Polygon cache, used for ray-tracing only.
Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020 | |