Go to the documentation of this file.
53 writeToStreamRender(out);
57 it != m_objects.end(); ++it)
72 readFromStreamRender(
in);
93 #if MRPT_HAS_OPENGL_GLUT
95 for (it = m_objects.begin(); it != m_objects.end(); ++it++)
100 dynamic_cast<CSetOfObjects*
>(it->get())->initializeAllTextures();
110 newObject.get() !=
this,
111 "Error: Trying to insert container into itself!");
112 m_objects.push_back(newObject);
121 it != m_objects.end(); ++it)
124 string s((*it)->GetRuntimeClass()->className);
125 if ((*it)->m_name.size())
129 if ((*it)->GetRuntimeClass() ==
134 std::vector<std::string> auxLst;
136 for (
size_t i = 0; i < auxLst.size(); i++)
137 lst.emplace_back(
string(
" ") + auxLst[i]);
148 it != m_objects.end(); ++it)
155 (*it)->GetRuntimeClass() ==
166 it != m_objects.end(); ++it)
167 if ((*it)->traceRay(nueva, tmp))
195 m_objects.begin(), m_objects.end(),
197 m_color.R =
c.R, m_color.G =
c.G, m_color.B =
c.B,
204 return find(m_objects.begin(), m_objects.end(),
obj) != m_objects.end();
210 it != m_objects.end(); ++it)
218 it != m_objects.end(); ++it)
226 it != m_objects.end(); ++it)
234 it != m_objects.end(); ++it)
245 it != m_objects.end(); ++it)
247 if ((*it)->m_name == str)
250 (*it)->GetRuntimeClass() ==
267 std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
268 std::numeric_limits<double>::max());
270 -std::numeric_limits<double>::max(),
271 -std::numeric_limits<double>::max(),
272 -std::numeric_limits<double>::max());
275 it != m_objects.end(); ++it)
278 std::numeric_limits<double>::max(),
279 std::numeric_limits<double>::max(),
280 std::numeric_limits<double>::max());
282 -std::numeric_limits<double>::max(),
283 -std::numeric_limits<double>::max(),
284 -std::numeric_limits<double>::max());
285 (*it)->getBoundingBox(child_bbmin, child_bbmax);
297 m_pose.composePoint(bb_min, bb_min);
298 m_pose.composePoint(bb_max, bb_max);
void keep_min(T &var, const K test_val)
If the second argument is below the first one, set the first argument to this lower value.
void dumpListOfObjects(std::vector< std::string > &lst)
Retrieves a list of all objects in text form
void clear()
Clear the contents of this container.
const Scalar * const_iterator
virtual CRenderizable & setColorG_u8(const uint8_t g)
Color components in the range [0,255].
bool contains(const CRenderizable::Ptr &obj) const
#define IS_DERIVED(ptrObj, class_name)
Evaluates to true if a pointer to an object (derived from mrpt::rtti::CObject) is an instance of the ...
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.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
GLsizei GLsizei GLuint * obj
virtual CRenderizable & setColorG_u8(const uint8_t g) override
Color components in the range [0,255].
virtual CRenderizable & setColorA_u8(const uint8_t a)
Color components in the range [0,255].
const_iterator find(const KEY &key) const
virtual CRenderizable & setColorB_u8(const uint8_t b)
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.
FSetColor(uint8_t R, uint8_t G, uint8_t B, uint8_t A)
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.
virtual CRenderizable & setColorR_u8(const uint8_t r)
Color components in the range [0,255].
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
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...
Virtual base class for "archives": classes abstracting I/O streams.
void renderSetOfObjects(const mrpt::opengl::CListOpenGLObjects &objs)
For each object in the list:
GLdouble GLdouble GLdouble r
void operator()(CRenderizable::Ptr &p)
A set of object, which are referenced to the coordinates framework established in this object.
void WriteAs(const TYPE_FROM_ACTUAL &value)
virtual CRenderizable & setColorA_u8(const uint8_t a) override
Color components in the range [0,255].
void keep_max(T &var, const K test_val)
If the second argument is above the first one, set the first argument to this higher value.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double x
X,Y,Z coordinates.
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::rtti::CObject) is of the give...
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
A base class for all OpenGL objects with loadable textures.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
virtual bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
void render() const override
Render child objects.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
virtual ~CSetOfObjects()
Private, virtual destructor: only can be deleted from smart pointers.
This base provides a set of functions for maths stuff.
void initializeAllTextures()
Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL)
GLsizei const GLchar ** string
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
virtual CRenderizable & setColorR_u8(const uint8_t r) override
Color components in the range [0,255].
The namespace for 3D scene representation and rendering.
unsigned __int32 uint32_t
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 | |