Helios++
Helios software for LiDAR simulations
visualhelios::VHDynSceneAdapter< ST, DT > Class Template Reference

Class defining core mechanisms to adapt dynamic scenes to the visual Helios context based on PCL and VTK libraries. More...

#include <VHDynSceneAdapter.h>

Collaboration diagram for visualhelios::VHDynSceneAdapter< ST, DT >:

Public Member Functions

 VHDynSceneAdapter (DynScene &dynScene)
 Constructor for the visual Helios dynamic scene adapter. More...
 
bool doStep ()
 Method to adapt dynamic scene computations over time to visual Helios. More...
 
DynScenegetDynScene ()
 Obtain the adapted dynamic scene. More...
 
size_t numStaticObjects () const
 Obtain the number of static objects composing the dynamic scene. More...
 
shared_ptr< ST > getAdaptedStaticObj (size_t const index)
 Obtain the adapted static object at given index. More...
 
ScenePartgetStaticObj (size_t const index)
 Obtain the static object at given index. More...
 
bool isStaticObjectRenderingNormals (size_t const index) const
 Check whether the normals of static object at given index must be rendered or not. More...
 
void setStaticObjectRenderingNormals (size_t const index, bool const renderingNormals)
 Enable or disable normals rendering for the static object at given index. More...
 
size_t numDynObjects () const
 Obtain the number of dynamic objects composing the dynamic scene. More...
 
shared_ptr< DT > getAdaptedDynObj (size_t const index)
 Obtain the adapted dynamic object at given index. More...
 
DynObjectgetDynObj (size_t const index)
 Obtain the dynamic object at given index. More...
 
bool isDynObjectUpdated (size_t const index) const
 Check if the dynamic object at given index has been updated on last step (true) or not (false) More...
 
bool isDynObjectRenderingNormals (size_t const index) const
 Obtain the ordered vertices indices representing the dynamic object at given index. More...
 
void setDynObjectRenderingNormals (size_t const index, bool const renderingNormals)
 Enable or disable normals rendering for the dynamic object at given index. More...
 
vector< pcl::Vertices > const & getVertices (size_t const index) const
 
string const & getId (size_t const index) const
 Obtain the ID of the dynamic object at given index. More...
 

Protected Attributes

DynScenedynScene
 The adapted dynamic scene. More...
 
vector< shared_ptr< DT > > dynObjs
 Vector of adapted dynamic objects from the adapted dynamic scene. More...
 
vector< shared_ptr< ST > > staticObjs
 Vector of adapted static objects from the adapted dynamic scene. More...
 

Detailed Description

template<typename ST, typename DT>
class visualhelios::VHDynSceneAdapter< ST, DT >

Class defining core mechanisms to adapt dynamic scenes to the visual Helios context based on PCL and VTK libraries.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
STType of static object adapter to be used by the dynamic scene adapter
DTType of dynamic object adapter to be used by the dynamic scene adapter
See also
visualhelios::VHDynObjectAdapter

Constructor & Destructor Documentation

◆ VHDynSceneAdapter()

template<typename ST , typename DT >
visualhelios::VHDynSceneAdapter< ST, DT >::VHDynSceneAdapter ( DynScene dynScene)

Constructor for the visual Helios dynamic scene adapter.

Parameters
dynSceneDynamic scene to be adapted for visual Helios

Member Function Documentation

◆ doStep()

template<typename ST , typename DT >
bool visualhelios::VHDynSceneAdapter< ST, DT >::doStep ( )

Method to adapt dynamic scene computations over time to visual Helios.

Returns
True if the dynamic scene was modified, false otherwise

◆ getAdaptedDynObj()

template<typename ST , typename DT >
shared_ptr<DT> visualhelios::VHDynSceneAdapter< ST, DT >::getAdaptedDynObj ( size_t const  index)
inline

Obtain the adapted dynamic object at given index.

Parameters
indexIndex of the dynamic object to be obtained
Returns
Adapted dynamic object at given index
See also
visualhelios::VHDynObjectAdapter

◆ getAdaptedStaticObj()

template<typename ST , typename DT >
shared_ptr<ST> visualhelios::VHDynSceneAdapter< ST, DT >::getAdaptedStaticObj ( size_t const  index)
inline

Obtain the adapted static object at given index.

Parameters
indexIndex of the static object to be obtained
Returns
Adapted static object at given index
See also
visualhelios::VHStaticObjectAdapter

◆ getDynObj()

template<typename ST , typename DT >
DynObject& visualhelios::VHDynSceneAdapter< ST, DT >::getDynObj ( size_t const  index)
inline

Obtain the dynamic object at given index.

Parameters
indexIndex of dynamic object to be obtained
Returns
Dynanic object at given index
See also
visualhelios::VHDynObjectAdapter::getDynObj
DynObject

◆ getDynScene()

template<typename ST , typename DT >
DynScene& visualhelios::VHDynSceneAdapter< ST, DT >::getDynScene ( )
inline

Obtain the adapted dynamic scene.

WARNING this getter returns the dynamic scene reference allowing modifications. Use with caution.

Returns
Adapted dynamic scene

◆ getId()

template<typename ST , typename DT >
string const& visualhelios::VHDynSceneAdapter< ST, DT >::getId ( size_t const  index) const
inline

Obtain the ID of the dynamic object at given index.

See also
visualhelios::VHDynObjectAdapter::getId

◆ getStaticObj()

template<typename ST , typename DT >
ScenePart& visualhelios::VHDynSceneAdapter< ST, DT >::getStaticObj ( size_t const  index)
inline

Obtain the static object at given index.

Parameters
indexIndex of static object to be obtained
Returns
Static object at given index
See also
visualhelios::VHStaticObjectAdapter::getStaticObj
ScenePart

◆ isDynObjectRenderingNormals()

template<typename ST , typename DT >
bool visualhelios::VHDynSceneAdapter< ST, DT >::isDynObjectRenderingNormals ( size_t const  index) const
inline

Obtain the ordered vertices indices representing the dynamic object at given index.

See also
visualhelios::VHDynObjectAdapter::getVertices

Check whether the normals of dynamic object at given index must be rendered or not

See also
visualhelios::VHDynObjectAdapter::isRenderingNormals

◆ isDynObjectUpdated()

template<typename ST , typename DT >
bool visualhelios::VHDynSceneAdapter< ST, DT >::isDynObjectUpdated ( size_t const  index) const
inline

Check if the dynamic object at given index has been updated on last step (true) or not (false)

Parameters
indexIndex of dynamic object to be checked
Returns
True if dynamic object at given index has been udpated on last step, false otherwise
See also
DynScene::isUpdated

◆ isStaticObjectRenderingNormals()

template<typename ST , typename DT >
bool visualhelios::VHDynSceneAdapter< ST, DT >::isStaticObjectRenderingNormals ( size_t const  index) const
inline

Check whether the normals of static object at given index must be rendered or not.

See also
visualhelios::VHStaticObjectAdapter::isRenderingNormals

◆ numDynObjects()

template<typename ST , typename DT >
size_t visualhelios::VHDynSceneAdapter< ST, DT >::numDynObjects ( ) const
inline

Obtain the number of dynamic objects composing the dynamic scene.

Returns
Number of dynamic objects composing the dynamic scene

◆ numStaticObjects()

template<typename ST , typename DT >
size_t visualhelios::VHDynSceneAdapter< ST, DT >::numStaticObjects ( ) const
inline

Obtain the number of static objects composing the dynamic scene.

Returns
Number of static objects composing the dynamic scene

◆ setDynObjectRenderingNormals()

template<typename ST , typename DT >
void visualhelios::VHDynSceneAdapter< ST, DT >::setDynObjectRenderingNormals ( size_t const  index,
bool const  renderingNormals 
)
inline

Enable or disable normals rendering for the dynamic object at given index.

See also
VHDynObjectAdapter::setRenderingNormals

◆ setStaticObjectRenderingNormals()

template<typename ST , typename DT >
void visualhelios::VHDynSceneAdapter< ST, DT >::setStaticObjectRenderingNormals ( size_t const  index,
bool const  renderingNormals 
)
inline

Enable or disable normals rendering for the static object at given index.

See also
VHStaticObjectAdapter::setRenderingNormals

Member Data Documentation

◆ dynObjs

template<typename ST , typename DT >
vector<shared_ptr<DT> > visualhelios::VHDynSceneAdapter< ST, DT >::dynObjs
protected

Vector of adapted dynamic objects from the adapted dynamic scene.

See also
visualhelios::VHDynObjectAdapter

◆ dynScene

template<typename ST , typename DT >
DynScene& visualhelios::VHDynSceneAdapter< ST, DT >::dynScene
protected

The adapted dynamic scene.

See also
DynScene

◆ staticObjs

template<typename ST , typename DT >
vector<shared_ptr<ST> > visualhelios::VHDynSceneAdapter< ST, DT >::staticObjs
protected

Vector of adapted static objects from the adapted dynamic scene.

See also
visualhelios::VHStaticObjectAdapter

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