#include <mrpt/opengl/CSetOfTriangles.h>

Classes | |
| struct | TTriangle |
| Triangle definition. More... | |
Public Types | |
| typedef std::vector< TTriangle > ::const_iterator | const_iterator |
| Const iterator type. | |
| typedef std::vector< TTriangle > ::const_reverse_iterator | const_reverse_iterator |
| Const reverse iterator type. | |
Public Member Functions | |
| void | updatePolygons () const |
| Polygon cache updating. | |
| void | clearTriangles () |
| Clear this object. | |
| size_t | getTrianglesCount () const |
| Get triangle count. | |
| void | getTriangle (size_t idx, TTriangle &t) const |
| Gets the triangle in a given position. | |
| void | insertTriangle (const TTriangle &t) |
| Inserts a triangle into the set. | |
| template<class InputIterator > | |
| void | insertTriangles (const InputIterator &begin, const InputIterator &end) |
| Inserts a set of triangles, bounded by iterators, into this set. | |
| void | insertTriangles (const CSetOfTrianglesPtr &p) |
| Inserts an existing CSetOfTriangles into this one. | |
| void | reserve (size_t t) |
| Reserves memory for certain number of triangles, avoiding multiple memory allocation calls. | |
| void | enableTransparency (bool v) |
| Enables or disables transparency. | |
| virtual void | setColor (double R, double G, double B, double A) |
| Changes the color to all the vertices in each triangle of the set. | |
| virtual void | setColor (const mrpt::utils::TColorf &c) |
| Changes the color to all the vertices in each triangle of the set. | |
| virtual void | setColorR (const double r) |
| Changes the red color component to all the vertices in each triangle of the set. | |
| virtual void | setColorG (const double g) |
| Changes the green color component to all the vertices in each triangle of the set. | |
| virtual void | setColorB (const double b) |
| Changes the blue color component to all the vertices in each triangle of the set. | |
| virtual void | setColorA (const double a) |
| Changes the alpha color component to all the vertices in each triangle of the set. | |
| void | render () const |
| Render. | |
| virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
| Ray tracing. | |
| void | getPolygons (std::vector< mrpt::math::TPolygon3D > &polys) const |
| Gets the polygon cache. | |
| const_iterator | begin () const |
| Gets the beginning iterator to this object. | |
| const_iterator | end () const |
| Gets the ending iterator to this object. | |
| const_reverse_iterator | rbegin () const |
| Gets the reverse beginning iterator to this object, which points to the last triangle. | |
| const_reverse_iterator | rend () const |
| Gets the reverse ending iterator to this object, which points to the beginning of the actual set. | |
Protected Attributes | |
| std::vector< TTriangle > | m_triangles |
| List of triangles. | |
| bool | m_enableTransparency |
| Transparency enabling. | |
| bool | polygonsUpToDate |
| Mutable variable used to check whether polygons need to be recalculated. | |
| std::vector < mrpt::math::TPolygonWithPlane > | tmpPolygons |
| Polygon cache. | |
Private Member Functions | |
| CSetOfTriangles (bool enableTransparency=false) | |
| Constructor. | |
| virtual | ~CSetOfTriangles () |
| Private, virtual destructor: only can be deleted from smart pointers. | |
This class can be used to draw any solid, arbitrarily complex object (without textures).
Definition at line 47 of file CSetOfTriangles.h.
| typedef std::vector<TTriangle>::const_iterator mrpt::opengl::CSetOfTriangles::const_iterator |
| typedef std::vector<TTriangle>::const_reverse_iterator mrpt::opengl::CSetOfTriangles::const_reverse_iterator |
| mrpt::opengl::CSetOfTriangles::CSetOfTriangles | ( | bool | enableTransparency = false |
) | [inline, private] |
| virtual mrpt::opengl::CSetOfTriangles::~CSetOfTriangles | ( | ) | [inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
Definition at line 204 of file CSetOfTriangles.h.
| const_iterator mrpt::opengl::CSetOfTriangles::begin | ( | ) | const [inline] |
| void mrpt::opengl::CSetOfTriangles::clearTriangles | ( | ) | [inline] |
| void mrpt::opengl::CSetOfTriangles::enableTransparency | ( | bool | v | ) | [inline] |
| const_iterator mrpt::opengl::CSetOfTriangles::end | ( | ) | const [inline] |
| void mrpt::opengl::CSetOfTriangles::getPolygons | ( | std::vector< mrpt::math::TPolygon3D > & | polys | ) | const |
Gets the polygon cache.
| void mrpt::opengl::CSetOfTriangles::getTriangle | ( | size_t | idx, | |
| TTriangle & | t | |||
| ) | const [inline] |
Gets the triangle in a given position.
Definition at line 101 of file CSetOfTriangles.h.
References ASSERT_.
| size_t mrpt::opengl::CSetOfTriangles::getTrianglesCount | ( | ) | const [inline] |
| void mrpt::opengl::CSetOfTriangles::insertTriangle | ( | const TTriangle & | t | ) | [inline] |
| void mrpt::opengl::CSetOfTriangles::insertTriangles | ( | const CSetOfTrianglesPtr & | p | ) | [inline] |
Inserts an existing CSetOfTriangles into this one.
Definition at line 117 of file CSetOfTriangles.h.
| void mrpt::opengl::CSetOfTriangles::insertTriangles | ( | const InputIterator & | begin, | |
| const InputIterator & | end | |||
| ) | [inline] |
Inserts a set of triangles, bounded by iterators, into this set.
Definition at line 110 of file CSetOfTriangles.h.
| const_reverse_iterator mrpt::opengl::CSetOfTriangles::rbegin | ( | ) | const [inline] |
Gets the reverse beginning iterator to this object, which points to the last triangle.
Definition at line 184 of file CSetOfTriangles.h.
| const_reverse_iterator mrpt::opengl::CSetOfTriangles::rend | ( | ) | const [inline] |
Gets the reverse ending iterator to this object, which points to the beginning of the actual set.
Definition at line 190 of file CSetOfTriangles.h.
| void mrpt::opengl::CSetOfTriangles::render | ( | ) | const [virtual] |
| void mrpt::opengl::CSetOfTriangles::reserve | ( | size_t | t | ) | [inline] |
Reserves memory for certain number of triangles, avoiding multiple memory allocation calls.
Definition at line 125 of file CSetOfTriangles.h.
| virtual void mrpt::opengl::CSetOfTriangles::setColor | ( | const mrpt::utils::TColorf & | c | ) | [virtual] |
Changes the color to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual void mrpt::opengl::CSetOfTriangles::setColor | ( | double | R, | |
| double | G, | |||
| double | B, | |||
| double | A | |||
| ) | [virtual] |
Changes the color to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual void mrpt::opengl::CSetOfTriangles::setColorA | ( | const double | a | ) | [virtual] |
Changes the alpha color component to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual void mrpt::opengl::CSetOfTriangles::setColorB | ( | const double | b | ) | [virtual] |
Changes the blue color component to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual void mrpt::opengl::CSetOfTriangles::setColorG | ( | const double | g | ) | [virtual] |
Changes the green color component to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual void mrpt::opengl::CSetOfTriangles::setColorR | ( | const double | r | ) | [virtual] |
Changes the red color component to all the vertices in each triangle of the set.
Reimplemented from mrpt::opengl::CRenderizable.
| virtual bool mrpt::opengl::CSetOfTriangles::traceRay | ( | const mrpt::poses::CPose3D & | o, | |
| double & | dist | |||
| ) | const [virtual] |
| void mrpt::opengl::CSetOfTriangles::updatePolygons | ( | ) | const |
Polygon cache updating.
bool mrpt::opengl::CSetOfTriangles::m_enableTransparency [protected] |
std::vector<TTriangle> mrpt::opengl::CSetOfTriangles::m_triangles [protected] |
bool mrpt::opengl::CSetOfTriangles::polygonsUpToDate [mutable, protected] |
Mutable variable used to check whether polygons need to be recalculated.
Definition at line 80 of file CSetOfTriangles.h.
std::vector<mrpt::math::TPolygonWithPlane> mrpt::opengl::CSetOfTriangles::tmpPolygons [mutable, protected] |
| Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:20:53 EDT 2009 |