12 #include <mrpt/core/optional_ref.h> 13 #include <mrpt/math/TBoundingBox.h> 14 #include <mrpt/opengl/COpenGLScene.h> 15 #include <mrpt/opengl/opengl_frwds.h> 16 #include <mrpt/poses/CPose3D.h> 34 bool insertCustomVizIntoPhysical =
true);
43 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
44 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical);
83 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
84 const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
85 bool childrenOnly =
false) = 0;
88 const mrpt::opengl::CRenderizable::Ptr& glModel,
89 const mrpt::poses::CPose3D& modelPose = {},
90 const float modelScale = 1.0f,
const std::string& modelName =
"group",
91 const std::optional<std::string>& modelURI = std::nullopt,
92 const bool initialShowBoundingBox =
false);
static double GeometryEpsilon
virtual void guiUpdate(const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical)
const bool insertCustomVizIntoPhysical_
virtual void internalGuiUpdate(const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly=false)=0
std::shared_ptr< mrpt::opengl::CSetOfObjects > glCustomVisual_
static void FreeOpenGLResources()
std::optional< Shape2p5 > collisionShape_
void showCollisionShape(bool show)
void setCollisionShape(const Shape2p5 &cs)
const bool insertCustomVizIntoViz_
VisualObject(World *parent, bool insertCustomVizIntoViz=true, bool insertCustomVizIntoPhysical=true)
bool customVisualVisible() const
int32_t glCustomVisualId_
const std::optional< Shape2p5 > & collisionShape() const
bool parseVisual(const rapidxml::xml_node< char > &rootNode)
Returns true if there is at least one <visual>...</visual> entry.
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)
bool implParseVisual(const rapidxml::xml_node< char > &visual_node)
Called by parseVisual once per "visual" block.
std::shared_ptr< mrpt::opengl::CSetOfObjects > glCollision_
const World * parent() const