Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
mvsim::VisualObject Class Referenceabstract

#include <VisualObject.h>

Inheritance diagram for mvsim::VisualObject:
Inheritance graph
[legend]

Public Member Functions

void getVisualModelBoundingBox (mrpt::math::TPoint3D &bbmin, mrpt::math::TPoint3D &bbmax) const
 
WorldgetWorldObject ()
 
const WorldgetWorldObject () const
 
virtual void guiUpdate (mrpt::opengl::COpenGLScene &scene)
 
void showBoundingBox (bool show)
 
 VisualObject (World *parent)
 
virtual ~VisualObject ()
 

Protected Member Functions

virtual mrpt::poses::CPose3D internalGuiGetVisualPose ()
 
virtual void internalGuiUpdate (mrpt::opengl::COpenGLScene &scene, bool childrenOnly=false)=0
 
bool parseVisual (const rapidxml::xml_node< char > *visual_node)
 

Protected Attributes

std::shared_ptr< mrpt::opengl::CSetOfObjectsm_glBoundingBox
 
std::shared_ptr< mrpt::opengl::CSetOfObjectsm_glCustomVisual
 
int32_t m_glCustomVisualId = -1
 
Worldm_world
 

Private Attributes

mrpt::math::TPoint3D viz_bbmax_ {1.0, 1.0, 1.0}
 
mrpt::math::TPoint3D viz_bbmin_ {-1.0, -1.0, .0}
 

Detailed Description

Virtual base class for any entity that can be shown in the 3D viewer (or sent out to RViz)

Definition at line 25 of file VisualObject.h.

Constructor & Destructor Documentation

mvsim::VisualObject::VisualObject ( World parent)
inline

Definition at line 28 of file VisualObject.h.

virtual mvsim::VisualObject::~VisualObject ( )
inlinevirtual

Definition at line 29 of file VisualObject.h.

Member Function Documentation

void mvsim::VisualObject::getVisualModelBoundingBox ( mrpt::math::TPoint3D bbmin,
mrpt::math::TPoint3D bbmax 
) const
inline

Returns bounding boxes, as loaded by parseVisual() from an XML config file.

Definition at line 39 of file VisualObject.h.

World* mvsim::VisualObject::getWorldObject ( )
inline

Definition at line 34 of file VisualObject.h.

const World* mvsim::VisualObject::getWorldObject ( ) const
inline

Definition at line 35 of file VisualObject.h.

void VisualObject::guiUpdate ( mrpt::opengl::COpenGLScene scene)
virtual

Must create a new object in the scene and/or update it according to the current state

Definition at line 29 of file VisualObject.cpp.

virtual mrpt::poses::CPose3D mvsim::VisualObject::internalGuiGetVisualPose ( )
inlineprotectedvirtual

Reimplemented in mvsim::VehicleBase, and mvsim::Block.

Definition at line 60 of file VisualObject.h.

virtual void mvsim::VisualObject::internalGuiUpdate ( mrpt::opengl::COpenGLScene scene,
bool  childrenOnly = false 
)
protectedpure virtual
bool VisualObject::parseVisual ( const rapidxml::xml_node< char > *  visual_node)
protected

Definition at line 74 of file VisualObject.cpp.

void VisualObject::showBoundingBox ( bool  show)

Definition at line 158 of file VisualObject.cpp.

Member Data Documentation

std::shared_ptr<mrpt::opengl::CSetOfObjects> mvsim::VisualObject::m_glBoundingBox
protected

Definition at line 55 of file VisualObject.h.

std::shared_ptr<mrpt::opengl::CSetOfObjects> mvsim::VisualObject::m_glCustomVisual
protected

If not empty, will override the derived-class visualization for this object.

Definition at line 54 of file VisualObject.h.

int32_t mvsim::VisualObject::m_glCustomVisualId = -1
protected

Definition at line 56 of file VisualObject.h.

World* mvsim::VisualObject::m_world
protected

Definition at line 50 of file VisualObject.h.

mrpt::math::TPoint3D mvsim::VisualObject::viz_bbmax_ {1.0, 1.0, 1.0}
private

Definition at line 63 of file VisualObject.h.

mrpt::math::TPoint3D mvsim::VisualObject::viz_bbmin_ {-1.0, -1.0, .0}
private

Definition at line 63 of file VisualObject.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52