#include <VisualObject.h>
Public Member Functions | |
const std::optional< Shape2p5 > & | collisionShape () const |
bool | customVisualVisible () const |
void | customVisualVisible (const bool visible) |
virtual void | guiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical) |
World * | parent () |
const World * | parent () const |
void | showCollisionShape (bool show) |
VisualObject (World *parent, bool insertCustomVizIntoViz=true, bool insertCustomVizIntoPhysical=true) | |
virtual | ~VisualObject () |
Static Public Member Functions | |
static void | FreeOpenGLResources () |
Static Public Attributes | |
static double | GeometryEpsilon = 1e-3 |
Protected Member Functions | |
void | addCustomVisualization (const mrpt::opengl::CRenderizable::Ptr &glModel, const mrpt::poses::CPose3D &modelPose={}, const float modelScale=1.0f, const std::string &modelName="group", const std::optional< std::string > &modelURI=std::nullopt, const bool initialShowBoundingBox=false) |
virtual void | internalGuiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly=false)=0 |
bool | parseVisual (const JointXMLnode<> &rootNode) |
bool | parseVisual (const rapidxml::xml_node< char > &rootNode) |
Returns true if there is at least one <visual>...</visual> entry. More... | |
void | setCollisionShape (const Shape2p5 &cs) |
Protected Attributes | |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCollision_ |
std::shared_ptr< mrpt::opengl::CSetOfObjects > | glCustomVisual_ |
int32_t | glCustomVisualId_ = -1 |
const bool | insertCustomVizIntoPhysical_ = true |
const bool | insertCustomVizIntoViz_ = true |
World * | world_ |
Private Member Functions | |
bool | implParseVisual (const rapidxml::xml_node< char > &visual_node) |
Called by parseVisual once per "visual" block. More... | |
Private Attributes | |
std::optional< Shape2p5 > | collisionShape_ |
Virtual base class for any entity that can be shown in the 3D viewer (or sent out to RViz)
Definition at line 35 of file VisualObject.h.
VisualObject::VisualObject | ( | World * | parent, |
bool | insertCustomVizIntoViz = true , |
||
bool | insertCustomVizIntoPhysical = true |
||
) |
Definition at line 32 of file VisualObject.cpp.
|
virtualdefault |
|
protected |
Definition at line 262 of file VisualObject.cpp.
|
inline |
Returns the collision shape, if defined (should be for regular entities after correct initialization).
Definition at line 59 of file VisualObject.h.
bool VisualObject::customVisualVisible | ( | ) | const |
Definition at line 257 of file VisualObject.cpp.
void VisualObject::customVisualVisible | ( | const bool | visible | ) |
Definition at line 250 of file VisualObject.cpp.
|
static |
Definition at line 153 of file VisualObject.cpp.
|
virtual |
This creates a new object in the scene and/or update it according to the current state of the object. If none of the scenes are passed, the poses of existing visual objects are updated, but no new ones are created.
Definition at line 44 of file VisualObject.cpp.
|
private |
Called by parseVisual once per "visual" block.
Definition at line 185 of file VisualObject.cpp.
|
protectedpure virtual |
|
inline |
Definition at line 51 of file VisualObject.h.
|
inline |
Definition at line 52 of file VisualObject.h.
|
protected |
Definition at line 170 of file VisualObject.cpp.
|
protected |
Returns true if there is at least one <visual>...</visual>
entry.
Definition at line 155 of file VisualObject.cpp.
Definition at line 95 of file VisualObject.h.
void VisualObject::showCollisionShape | ( | bool | show | ) |
Definition at line 244 of file VisualObject.cpp.
|
private |
Definition at line 98 of file VisualObject.h.
|
static |
Epsilon for geometry checks related to bounding boxes (default:1e-3)
Definition at line 66 of file VisualObject.h.
|
protected |
Definition at line 78 of file VisualObject.h.
|
protected |
If not empty, will override the derived-class visualization for this object.
Definition at line 77 of file VisualObject.h.
|
protected |
Definition at line 79 of file VisualObject.h.
|
protected |
Definition at line 82 of file VisualObject.h.
|
protected |
Definition at line 81 of file VisualObject.h.
|
protected |
Definition at line 73 of file VisualObject.h.