class mrpt::viz::CSetOfObjects
Overview
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 Scene
See also:
opengl::Scene
#include <mrpt/viz/CSetOfObjects.h> class CSetOfObjects: public mrpt::viz::CVisualObject { public: // typedefs typedef std::shared_ptr<mrpt::viz ::CSetOfObjects> Ptr; typedef std::shared_ptr<const mrpt::viz ::CSetOfObjects> ConstPtr; typedef std::unique_ptr<mrpt::viz ::CSetOfObjects> UniquePtr; typedef std::unique_ptr<const mrpt::viz ::CSetOfObjects> ConstUniquePtr; typedef ListVisualObjects::const_iterator const_iterator; typedef ListVisualObjects::iterator iterator; // fields static constexpr const char* className = "mrpt::viz" "::" "CSetOfObjects"; // construction CSetOfObjects(); // methods static constexpr auto getClassName(); static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); static std::shared_ptr<CObject> CreateObject(); template <typename... Args> static Ptr Create(Args&&... args); template <typename Alloc, typename... Args> static Ptr CreateAlloc( const Alloc& alloc, Args&&... args ); template <typename... Args> static UniquePtr CreateUnique(Args&&... args); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual mrpt::rtti::CObject* clone() const; const_iterator begin() const; const_iterator end() const; iterator begin(); iterator end(); void clear(); template <typename T> T::Ptr getByClass(size_t ith = 0); virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const; virtual CVisualObject& setColor_u8(const mrpt::img::TColor& c); bool contains(const CVisualObject::Ptr& obj) const; virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const; }; // direct descendants class CAssimpModel;
Inherited Members
public: // typedefs typedef std::shared_ptr<CObject> Ptr; typedef std::shared_ptr<const CObject> ConstPtr; typedef std::shared_ptr<CSerializable> Ptr; typedef std::shared_ptr<const CSerializable> ConstPtr; // structs struct PoseAndScale; struct State; // methods static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
Typedefs
typedef std::shared_ptr<mrpt::viz ::CSetOfObjects> Ptr
A type for the associated smart pointer.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Methods
virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const
Returns information about the class of an object in runtime.
virtual mrpt::rtti::CObject* clone() const
Returns a deep copy (clone) of the object, indepently of its class.
void clear()
Clear the list of objects in the scene, deleting objects’ memory.
virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const
Simulation of ray-trace, given a pose.
Returns true if the ray effectively collisions with the object (returning the distance to the origin of the ray in “dist”), or false in other case. “dist” variable yields undefined behaviour when false is returned
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const
Must be implemented by derived classes to provide the updated bounding box in the object local frame of coordinates.
This will be called only once after each time the derived class reports to notifyChange() that the object geometry changed.
See also:
getBoundingBox(), getBoundingBoxLocal(), getBoundingBoxLocalf()