Go to the documentation of this file.
52 insert(objs.begin(), objs.end());
68 void render()
const override;
97 typename T::Ptr
getByClass(
const size_t& ith = 0)
const;
177 o->insertCollection(
v);
183 template <
typename T>
187 size_t foundCount = 0;
188 const auto class_ID = &T::GetRuntimeClassIdStatic();
190 if (o && o->GetRuntimeClass()->derivedFrom(class_ID))
191 if (foundCount++ == ith)
return std::dynamic_pointer_cast<T>(o);
197 o->GetRuntimeClass() ==
200 typename T::Ptr
obj = std::dynamic_pointer_cast<CSetOfObjects>(o)
201 ->template getByClass<T>(ith);
206 return typename T::Ptr();
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually),...
CListOpenGLObjects m_objects
The list of child objects.
void dumpListOfObjects(std::vector< std::string > &lst)
Retrieves a list of all objects in text form
const Scalar * const_iterator
bool contains(const CRenderizable::Ptr &obj) const
void removeObject(const CRenderizable::Ptr &obj)
Removes the given object from the scene (it also deletes the object to free its memory).
The base class of 3D objects that can be directly rendered through OpenGL.
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually).
GLsizei GLsizei GLuint * obj
virtual CRenderizable & setColorG_u8(const uint8_t g) override
Color components in the range [0,255].
CRenderizable::Ptr getByName(const std::string &str)
Returns the first object with a given name, or a nullptr pointer if not found.
void insert(const CRenderizable::Ptr &newObject)
Insert a new object to the list.
std::shared_ptr< CRenderizable > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CListOpenGLObjects::const_iterator const_iterator
virtual CRenderizable & setColorB_u8(const uint8_t b) override
Color components in the range [0,255].
virtual 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...
T::Ptr getByClass(const size_t &ith=0) const
Returns the i'th object of a given class (or of a descendant class), or nullptr (an empty smart point...
void insert(const T_it &begin, const T_it &end)
Inserts a set of objects, bounded by iterators, into the list.
GLdouble GLdouble GLdouble r
A set of object, which are referenced to the coordinates framework established in this object.
virtual CRenderizable & setColorA_u8(const uint8_t a) override
Color components in the range [0,255].
static CSetOfObjects::Ptr 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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
const_iterator begin() const
void clear()
Clear the list of objects in the scene, deleting objects' memory.
std::shared_ptr< CSetOfObjects > Ptr
virtual bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const mrpt::opengl::CLight &o)
void render() const override
Render child objects.
void insertCollection(const T &objs)
Inserts a set of objects into the list.
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
bool empty() const
Returns true if there are no objects.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
virtual ~CSetOfObjects()
Private, virtual destructor: only can be deleted from smart pointers.
std::deque< CRenderizable::Ptr > CListOpenGLObjects
A list of objects pointers, automatically managing memory free at destructor, and managing copies cor...
void initializeAllTextures()
Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL)
GLsizei const GLchar ** string
const_iterator end() const
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x,...
size_t size()
Returns number of objects.
virtual CRenderizable & setColorR_u8(const uint8_t r) override
Color components in the range [0,255].
The namespace for 3D scene representation and rendering.
CListOpenGLObjects::iterator iterator
virtual CRenderizable & setColor_u8(const mrpt::img::TColor &c) override
CSetOfObjects()
Default constructor.
GLubyte GLubyte GLubyte a
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |