9 #ifndef opengl_CSetOfTriangles_H    10 #define opengl_CSetOfTriangles_H    35             for (
size_t i = 0; i < 3; i++)
    37                 r[i] = 
g[i] = 
b[i] = 
a[i] = 1.0f;
    43             for (
size_t i = 0; i < 3; i++)
    48                 r[i] = 
g[i] = 
b[i] = 
a[i] = 1.0f;
    51         float x[3], 
y[3], 
z[3];
    52         float r[3], 
g[3], 
b[3], 
a[3];
    56         std::vector<TTriangle>::const_reverse_iterator;
    75     mutable std::vector<mrpt::math::TPolygonWithPlane> 
tmpPolygons;
   116     template <
class InputIterator>
   118         const InputIterator& 
begin, 
const InputIterator& 
end)
   163     void getPolygons(std::vector<mrpt::math::TPolygon3D>& polys) 
const;
   170     template <
class CONTAINER>
   223     s->insertTriangles(
t.begin(), 
t.end());
   233     s->insertTriangle(
t);
 void getTriangle(size_t idx, TTriangle &t) const
Gets the triangle in a given position. 
const_reverse_iterator rend() const
Gets the reverse ending iterator to this object, which points to the beginning of the actual set...
CRenderizable & setColorG_u8(const uint8_t g) override
Color components in the range [0,255]. 
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing. 
void getPolygons(std::vector< mrpt::math::TPolygon3D > &polys) const
Gets the polygon cache. 
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const mrpt::opengl::CLight &o)
const_iterator end() const
Gets the ending iterator to this object. 
The base class of 3D objects that can be directly rendered through OpenGL. 
std::vector< mrpt::math::TPolygonWithPlane > tmpPolygons
Polygon cache. 
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
CRenderizable & setColor_u8(const mrpt::img::TColor &c) override
Changes the default object color. 
size_t getTrianglesCount() const
Get triangle count. 
const_iterator begin() const
Gets the beginning iterator to this object. 
CRenderizable & setColorR_u8(const uint8_t r) override
Color components in the range [0,255]. 
TTriangle(const mrpt::math::TPolygon3D &p)
A renderizable object suitable for rendering with OpenGL's display lists. 
#define ASSERT_(f)
Defines an assertion mechanism. 
void insertTriangle(const TTriangle &t)
Inserts a triangle into the set. 
void render_dl() const override
Render. 
CSetOfTriangles(bool enableTransparency=false)
Constructor. 
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...
std::vector< TTriangle > m_triangles
List of triangles. 
void enableTransparency(bool v)
Enables or disables transparency. 
void updatePolygons() const
Polygon cache updating. 
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::vector< TTriangle >::const_iterator const_iterator
const_reverse_iterator rbegin() const
Gets the reverse beginning iterator to this object, which points to the last triangle. 
GLdouble GLdouble GLdouble r
A class used to store a 3D pose (a 3D translation + a rotation in 3D). 
The namespace for 3D scene representation and rendering. 
void reserve(size_t t)
Reserves memory for certain number of triangles, avoiding multiple memory allocation calls...
virtual ~CSetOfTriangles()
Private, virtual destructor: only can be deleted from smart pointers. 
A set of colored triangles. 
void clearTriangles()
Clear this object. 
std::vector< TTriangle >::const_reverse_iterator const_reverse_iterator
void insertTriangles(const CONTAINER &c)
Inserts a set of triangles, given in a container of either TTriangle's or TPolygon3D. 
bool polygonsUpToDate
Mutable variable used to check whether polygons need to be recalculated. 
CRenderizable & setColorB_u8(const uint8_t b) override
Color components in the range [0,255]. 
GLubyte GLubyte GLubyte a
bool m_enableTransparency
Transparency enabling. 
CRenderizable & setColorA_u8(const uint8_t a) override
Color components in the range [0,255]. 
void insertTriangles(const InputIterator &begin, const InputIterator &end)
Inserts a set of triangles, bounded by iterators, into this set. 
const Scalar * const_iterator
3D polygon, inheriting from std::vector<TPoint3D>