#include <VisualObject.h>
Public Member Functions | |
const std::optional< Shape2p5 > & | collisionShape () const |
void | customVisualVisible (const bool visible) |
bool | customVisualVisible () const |
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 rapidxml::xml_node< char > &rootNode) |
Returns true if there is at least one <visual>...</visual> entry. More... | |
bool | parseVisual (const JointXMLnode<> &rootNode) |
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 29 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 264 of file VisualObject.cpp.
|
inline |
Returns the collision shape, if defined (should be for regular entities after correct initialization).
Definition at line 54 of file VisualObject.h.
void VisualObject::customVisualVisible | ( | const bool | visible | ) |
Definition at line 252 of file VisualObject.cpp.
bool VisualObject::customVisualVisible | ( | ) | const |
Definition at line 259 of file VisualObject.cpp.
|
static |
Definition at line 154 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 45 of file VisualObject.cpp.
|
private |
Called by parseVisual once per "visual" block.
Definition at line 187 of file VisualObject.cpp.
|
protectedpure virtual |
|
inline |
Definition at line 46 of file VisualObject.h.
|
inline |
Definition at line 47 of file VisualObject.h.
|
protected |
Returns true if there is at least one <visual>...</visual>
entry.
Definition at line 156 of file VisualObject.cpp.
|
protected |
Definition at line 172 of file VisualObject.cpp.
Definition at line 94 of file VisualObject.h.
void VisualObject::showCollisionShape | ( | bool | show | ) |
Definition at line 246 of file VisualObject.cpp.
|
private |
Definition at line 97 of file VisualObject.h.
|
static |
Epsilon for geometry checks related to bounding boxes (default:1e-3)
Definition at line 64 of file VisualObject.h.
|
protected |
Definition at line 76 of file VisualObject.h.
|
protected |
If not empty, will override the derived-class visualization for this object.
Definition at line 75 of file VisualObject.h.
|
protected |
Definition at line 77 of file VisualObject.h.
|
protected |
Definition at line 80 of file VisualObject.h.
|
protected |
Definition at line 79 of file VisualObject.h.
|
protected |
Definition at line 71 of file VisualObject.h.