A set of object, which are referenced to the coordinates framework established in this object.
It can be established a hierarchy of "CSetOfObjects", where the coordinates framework of each one will be referenced to the parent's one. The list of child objects is accessed directly as in the class "COpenGLScene"
#include <mrpt/opengl/CSetOfObjects.h>

Public Types | |
| typedef CListOpenGLObjects::const_iterator | const_iterator |
| typedef CListOpenGLObjects::iterator | iterator |
Public Member Functions | |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | begin () |
| iterator | end () |
| template<class T > | |
| void | insertCollection (const T &objs) |
| Inserts a set of objects into the list. | |
| void | insert (const CRenderizablePtr &newObject) |
| Insert a new object to the list. | |
| template<class T_it > | |
| void | insert (const T_it &begin, const T_it &end) |
| Inserts a set of objects, bounded by iterators, into the list. | |
| void | render () const |
| Render child objects. | |
| void | clear () |
| Clear the list of objects in the scene, deleting objects' memory. | |
| size_t | size () |
| Returns number of objects. | |
| bool | empty () const |
| Returns true if there are no objects. | |
| void | initializeAllTextures () |
| Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL) | |
| CRenderizablePtr | getByName (const std::string &str) |
| Returns the first object with a given name, or a NULL pointer if not found. | |
| template<typename T > | |
| T::SmartPtr | getByClass (const size_t &ith=0) const |
| Returns the i'th object of a given class (or of a descendant class), or NULL (an empty smart pointer) if not found. | |
| void | removeObject (const CRenderizablePtr &obj) |
| Removes the given object from the scene (it also deletes the object to free its memory). | |
| void | dumpListOfObjects (utils::CStringList &lst) |
| Retrieves a list of all objects in text form. | |
| virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
| Ray tracing. | |
| virtual CRenderizable & | setColor_u8 (const mrpt::utils::TColor &c) |
| virtual CRenderizable & | setColorR_u8 (const uint8_t r) |
| Color components in the range [0,255]. | |
| virtual CRenderizable & | setColorG_u8 (const uint8_t g) |
| Color components in the range [0,255]. | |
| virtual CRenderizable & | setColorB_u8 (const uint8_t b) |
| Color components in the range [0,255]. | |
| virtual CRenderizable & | setColorA_u8 (const uint8_t a) |
| Color components in the range [0,255]. | |
| bool | contains (const CRenderizablePtr &obj) const |
Static Public Member Functions | |
pose_pdf -> 3d objects auxiliary templates | |
| static CSetOfObjectsPtr | posePDF2opengl (const mrpt::poses::CPosePDF &o) |
| Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPosePDF::getAs3DObject. | |
| static CSetOfObjectsPtr | posePDF2opengl (const mrpt::poses::CPointPDF &o) |
| Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPointPDF::getAs3DObject. | |
| static CSetOfObjectsPtr | posePDF2opengl (const mrpt::poses::CPose3DPDF &o) |
| Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPose3DPDF::getAs3DObject. | |
| static CSetOfObjectsPtr | posePDF2opengl (const mrpt::poses::CPose3DQuatPDF &o) |
| Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPose3DQuatPDF::getAs3DObject. | |
Protected Attributes | |
| CListOpenGLObjects | m_objects |
| The list of child objects. | |
Private Member Functions | |
| CSetOfObjects () | |
| Default constructor. | |
| virtual | ~CSetOfObjects () |
| Private, virtual destructor: only can be deleted from smart pointers. | |
RTTI stuff | |
| typedef CSetOfObjectsPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CSetOfObjects |
| static mrpt::utils::TRuntimeClassId | classCSetOfObjects |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CSetOfObjectsPtr | Create () |
Definition at line 67 of file CSetOfObjects.h.
Definition at line 68 of file CSetOfObjects.h.
A typedef for the associated smart pointer
Definition at line 57 of file CSetOfObjects.h.
| mrpt::opengl::CSetOfObjects::CSetOfObjects | ( | ) | [private] |
Default constructor.
| virtual mrpt::opengl::CSetOfObjects::~CSetOfObjects | ( | ) | [private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
| static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfObjects::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizable.
| const_iterator mrpt::opengl::CSetOfObjects::begin | ( | ) | const [inline] |
Definition at line 70 of file CSetOfObjects.h.
| iterator mrpt::opengl::CSetOfObjects::begin | ( | ) | [inline] |
Definition at line 72 of file CSetOfObjects.h.
| void mrpt::opengl::CSetOfObjects::clear | ( | ) |
Clear the list of objects in the scene, deleting objects' memory.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_graphics_boundingboxes().
| bool mrpt::opengl::CSetOfObjects::contains | ( | const CRenderizablePtr & | obj | ) | const |
| static CSetOfObjectsPtr mrpt::opengl::CSetOfObjects::Create | ( | ) | [static] |
Referenced by mrpt::opengl::graph_tools::graph_visualize().
| static mrpt::utils::CObject* mrpt::opengl::CSetOfObjects::CreateObject | ( | ) | [static] |
| void mrpt::opengl::CSetOfObjects::dumpListOfObjects | ( | utils::CStringList & | lst | ) |
Retrieves a list of all objects in text form.
| virtual mrpt::utils::CObject* mrpt::opengl::CSetOfObjects::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| bool mrpt::opengl::CSetOfObjects::empty | ( | ) | const [inline] |
Returns true if there are no objects.
Definition at line 102 of file CSetOfObjects.h.
| const_iterator mrpt::opengl::CSetOfObjects::end | ( | ) | const [inline] |
Definition at line 71 of file CSetOfObjects.h.
| iterator mrpt::opengl::CSetOfObjects::end | ( | ) | [inline] |
Definition at line 73 of file CSetOfObjects.h.
| T::SmartPtr mrpt::opengl::CSetOfObjects::getByClass | ( | const size_t & | ith = 0 | ) | const [inline] |
Returns the i'th object of a given class (or of a descendant class), or NULL (an empty smart pointer) if not found.
Example:
CSpherePtr obs = myscene.getByClass<CSphere>();
By default (ith=0), the first observation is returned.
Definition at line 120 of file CSetOfObjects.h.
References MRPT_START, CLASS_ID_NAMESPACE, and MRPT_END.
| CRenderizablePtr mrpt::opengl::CSetOfObjects::getByName | ( | const std::string & | str | ) |
Returns the first object with a given name, or a NULL pointer if not found.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfObjects::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizable.
| void mrpt::opengl::CSetOfObjects::initializeAllTextures | ( | ) |
Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL)
| void mrpt::opengl::CSetOfObjects::insert | ( | const CRenderizablePtr & | newObject | ) |
Insert a new object to the list.
Referenced by mrpt::opengl::COctreePointRenderer< CPointCloudColoured >::octree_get_graphics_boundingboxes().
| void mrpt::opengl::CSetOfObjects::insert | ( | const T_it & | begin, |
| const T_it & | end | ||
| ) | [inline] |
Inserts a set of objects, bounded by iterators, into the list.
Definition at line 86 of file CSetOfObjects.h.
References end().
| void mrpt::opengl::CSetOfObjects::insertCollection | ( | const T & | objs | ) | [inline] |
Inserts a set of objects into the list.
Definition at line 77 of file CSetOfObjects.h.
| static CSetOfObjectsPtr mrpt::opengl::CSetOfObjects::posePDF2opengl | ( | const mrpt::poses::CPosePDF & | o | ) | [static] |
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPosePDF::getAs3DObject.
Referenced by mrpt::opengl::posePDF2opengl().
| static CSetOfObjectsPtr mrpt::opengl::CSetOfObjects::posePDF2opengl | ( | const mrpt::poses::CPointPDF & | o | ) | [static] |
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPointPDF::getAs3DObject.
| static CSetOfObjectsPtr mrpt::opengl::CSetOfObjects::posePDF2opengl | ( | const mrpt::poses::CPose3DPDF & | o | ) | [static] |
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPose3DPDF::getAs3DObject.
| static CSetOfObjectsPtr mrpt::opengl::CSetOfObjects::posePDF2opengl | ( | const mrpt::poses::CPose3DQuatPDF & | o | ) | [static] |
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call mrpt::poses::CPose3DQuatPDF::getAs3DObject.
| void mrpt::opengl::CSetOfObjects::removeObject | ( | const CRenderizablePtr & | obj | ) |
Removes the given object from the scene (it also deletes the object to free its memory).
| void mrpt::opengl::CSetOfObjects::render | ( | ) | const [virtual] |
Render child objects.
Implements mrpt::opengl::CRenderizable.
| virtual CRenderizable& mrpt::opengl::CSetOfObjects::setColor_u8 | ( | const mrpt::utils::TColor & | c | ) | [virtual] |
Reimplemented from mrpt::opengl::CRenderizable.
| virtual CRenderizable& mrpt::opengl::CSetOfObjects::setColorA_u8 | ( | const uint8_t | a | ) | [virtual] |
Color components in the range [0,255].
Reimplemented from mrpt::opengl::CRenderizable.
| virtual CRenderizable& mrpt::opengl::CSetOfObjects::setColorB_u8 | ( | const uint8_t | b | ) | [virtual] |
Color components in the range [0,255].
Reimplemented from mrpt::opengl::CRenderizable.
| virtual CRenderizable& mrpt::opengl::CSetOfObjects::setColorG_u8 | ( | const uint8_t | g | ) | [virtual] |
Color components in the range [0,255].
Reimplemented from mrpt::opengl::CRenderizable.
| virtual CRenderizable& mrpt::opengl::CSetOfObjects::setColorR_u8 | ( | const uint8_t | r | ) | [virtual] |
Color components in the range [0,255].
Reimplemented from mrpt::opengl::CRenderizable.
| size_t mrpt::opengl::CSetOfObjects::size | ( | ) | [inline] |
Returns number of objects.
Definition at line 99 of file CSetOfObjects.h.
| virtual bool mrpt::opengl::CSetOfObjects::traceRay | ( | const mrpt::poses::CPose3D & | o, |
| double & | dist | ||
| ) | const [virtual] |
Ray tracing.
Reimplemented from mrpt::opengl::CRenderizable.
mrpt::utils::CLASSINIT mrpt::opengl::CSetOfObjects::_init_CSetOfObjects [static, protected] |
Definition at line 57 of file CSetOfObjects.h.
Definition at line 57 of file CSetOfObjects.h.
const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfObjects::classinfo [static] |
Definition at line 57 of file CSetOfObjects.h.
The list of child objects.
Objects are automatically deleted when calling "clear" or in the destructor.
Definition at line 63 of file CSetOfObjects.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011 |