Go to the documentation of this file.
9 #ifndef opengl_CSetOfObjects_H
10 #define opengl_CSetOfObjects_H
55 insert(objs.begin(),objs.end());
59 void insert(
const CRenderizablePtr &newObject );
64 for (T_it it=
begin;it!=
end;it++) insert(*it);
76 size_t size() {
return m_objects.size(); }
79 inline bool empty()
const {
return m_objects.empty(); }
83 void initializeAllTextures();
87 CRenderizablePtr getByName(
const std::string &str );
97 typename T::SmartPtr getByClass(
const size_t &ith = 0 )
const;
101 void removeObject(
const CRenderizablePtr &obj );
113 bool contains(
const CRenderizablePtr &obj)
const;
153 inline CSetOfObjectsPtr &operator<<(CSetOfObjectsPtr &s,const CRenderizablePtr &r) {
160 template<
class T>
inline CSetOfObjectsPtr &
operator<<(CSetOfObjectsPtr &o,
const std::vector<T> &v) {
161 o->insertCollection(v);
166 template <
typename T>
170 size_t foundCount = 0;
173 if ( (*it).present() && (*it)->GetRuntimeClass()->derivedFrom( class_ID ) )
174 if (foundCount++ == ith)
175 return typename T::SmartPtr(*it);
182 typename T::SmartPtr o = CSetOfObjectsPtr(*it)->getByClass<T>(ith);
187 return typename T::SmartPtr();
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually),...
CListOpenGLObjects m_objects
The list of child objects.
EIGEN_STRONG_INLINE iterator begin()
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).
size_t size(const MATRIXLIKE &m, int dim)
EIGEN_STRONG_INLINE iterator end()
std::deque< CRenderizablePtr > CListOpenGLObjects
A list of objects pointers, automatically managing memory free at destructor, and managing copies cor...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const typedef Scalar * const_iterator
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)...
void insert(const T_it &begin, const T_it &end)
Inserts a set of objects, bounded by iterators, into the list.
A set of object, which are referenced to the coordinates framework established in this object.
CListOpenGLObjects::const_iterator const_iterator
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
Access to runtime class ID for a defined class name.
const_iterator begin() const
CListOpenGLObjects::iterator iterator
void insertCollection(const T &objs)
Inserts a set of objects into the list.
OPENGL_IMPEXP mrpt::utils::CStream & operator<<(mrpt::utils::CStream &out, const mrpt::opengl::CLight &o)
Declares a class that represents a probability density function (pdf) of a 2D pose (x,...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
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...
CSetOfObjectsPtr posePDF2opengl(const POSE_PDF &o)
Returns a representation of a the PDF - this is just an auxiliary function, it's more natural to call...
bool BASE_IMPEXP traceRay(const vector< TPolygonWithPlane > &vec, const mrpt::poses::CPose3D &pose, double &dist)
Fast ray tracing method using polygons' properties.
const_iterator end() const
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x,...
A class for storing a list of text lines.
A structure that holds runtime class type information.
The namespace for 3D scene representation and rendering.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 | | |