Simox  2.3.50
VirtualRobot::SceneObjectSet Class Reference
Inheritance diagram for VirtualRobot::SceneObjectSet:
VirtualRobot::RobotNodeSet VirtualRobot::KinematicChain

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SceneObjectSet (const std::string &name="", CollisionCheckerPtr colChecker=CollisionCheckerPtr())
 
virtual ~SceneObjectSet ()
 
std::string getName () const
 
virtual bool addSceneObject (SceneObjectPtr sceneObject)
 store axis aligned bounding box covering all CollisionModels to store_aabb More...
 
virtual bool addSceneObjects (SceneObjectSetPtr sceneObjectSet)
 append a set of collision models More...
 
virtual bool addSceneObjects (RobotNodeSetPtr robotNodeSet)
 
virtual bool addSceneObjects (std::vector< RobotNodePtr > robotNodes)
 
virtual bool removeSceneObject (SceneObjectPtr sceneObject)
 remove a single col model from this Set More...
 
CollisionCheckerPtr getCollisionChecker ()
 
std::vector< CollisionModelPtrgetCollisionModels ()
 
std::vector< SceneObjectPtrgetSceneObjects ()
 
virtual unsigned int getSize () const
 
virtual SceneObjectPtr getSceneObject (unsigned int nr)
 
virtual bool hasSceneObject (SceneObjectPtr sceneObject)
 Returns true, if sceneObject is part of this set. More...
 
virtual bool getCurrentSceneObjectConfig (std::map< SceneObjectPtr, Eigen::Matrix4f > &storeConfig)
 fills the current globalPose of all associated sceneobjects to map. More...
 
virtual std::string toXML (int tabs)
 
SceneObjectSetPtr clone (const std::string &newName="")
 
SceneObjectSetPtr clone (const std::string &newName, CollisionCheckerPtr newColChecker)
 
ObstaclePtr createStaticObstacle (const std::string &name)
 

Protected Member Functions

void destroyData ()
 delete all data More...
 

Protected Attributes

std::string name
 
std::vector< SceneObjectPtrsceneObjects
 
CollisionCheckerPtr colChecker
 

Constructor & Destructor Documentation

VirtualRobot::SceneObjectSet::SceneObjectSet ( const std::string &  name = "",
CollisionCheckerPtr  colChecker = CollisionCheckerPtr() 
)

Standard Constructor.

Parameters
nameA name string.
colCheckerCan be used to link this object to different instances of the collision checker. If NULL, the global collision checker singleton is used.
VirtualRobot::SceneObjectSet::~SceneObjectSet ( )
virtual

Standard Destructor.

Member Function Documentation

bool VirtualRobot::SceneObjectSet::addSceneObject ( SceneObjectPtr  sceneObject)
virtual

store axis aligned bounding box covering all CollisionModels to store_aabb

store axis aligned bounding boxes to store_aabbs store object oriented bounding boxes of contained models to store_oobbs along with iv model append a single object

Reimplemented in VirtualRobot::RobotNodeSet.

bool VirtualRobot::SceneObjectSet::addSceneObjects ( SceneObjectSetPtr  sceneObjectSet)
virtual

append a set of collision models

Reimplemented in VirtualRobot::RobotNodeSet.

bool VirtualRobot::SceneObjectSet::addSceneObjects ( RobotNodeSetPtr  robotNodeSet)
virtual

Append all associated object of the given robotNodeSet.

Reimplemented in VirtualRobot::RobotNodeSet.

bool VirtualRobot::SceneObjectSet::addSceneObjects ( std::vector< RobotNodePtr robotNodes)
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

VirtualRobot::SceneObjectSetPtr VirtualRobot::SceneObjectSet::clone ( const std::string &  newName = "")

Create a (shallow) copy of this set. The containing sceneobjects are not cloned, but referenced by the newly generated set.

Parameters
newNameThe name of the newly created set.
VirtualRobot::SceneObjectSetPtr VirtualRobot::SceneObjectSet::clone ( const std::string &  newName,
CollisionCheckerPtr  newColChecker 
)

Create a deep copy of this set, which means that all sceneobjects are cloned.

Parameters
newNameThe name of the newly created set.
newColCheckerA new collision checker instance.
VirtualRobot::ObstaclePtr VirtualRobot::SceneObjectSet::createStaticObstacle ( const std::string &  name)

This method creates a new obstacle from all added SceneObjects. Note, that the resulting object is a rigid body that can be placed in the scene but the internal structure is fixed. This object can be useful when the SceneObjectSet consists of a large number of objects that do not change their relation to each other. When building a static obstacle collision detection can be performed much more efficient.

void VirtualRobot::SceneObjectSet::destroyData ( )
protected

delete all data

CollisionCheckerPtr VirtualRobot::SceneObjectSet::getCollisionChecker ( )
inline
std::vector< CollisionModelPtr > VirtualRobot::SceneObjectSet::getCollisionModels ( )

Returns all covered collision models.

bool VirtualRobot::SceneObjectSet::getCurrentSceneObjectConfig ( std::map< SceneObjectPtr, Eigen::Matrix4f > &  storeConfig)
virtual

fills the current globalPose of all associated sceneobjects to map.

std::string VirtualRobot::SceneObjectSet::getName ( ) const

Returns name of this model

VirtualRobot::SceneObjectPtr VirtualRobot::SceneObjectSet::getSceneObject ( unsigned int  nr)
virtual
std::vector< SceneObjectPtr > VirtualRobot::SceneObjectSet::getSceneObjects ( )
unsigned int VirtualRobot::SceneObjectSet::getSize ( ) const
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

bool VirtualRobot::SceneObjectSet::hasSceneObject ( SceneObjectPtr  sceneObject)
virtual

Returns true, if sceneObject is part of this set.

bool VirtualRobot::SceneObjectSet::removeSceneObject ( SceneObjectPtr  sceneObject)
virtual

remove a single col model from this Set

Reimplemented in VirtualRobot::RobotNodeSet.

std::string VirtualRobot::SceneObjectSet::toXML ( int  tabs)
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

Field Documentation

CollisionCheckerPtr VirtualRobot::SceneObjectSet::colChecker
protected
std::string VirtualRobot::SceneObjectSet::name
protected
std::vector< SceneObjectPtr > VirtualRobot::SceneObjectSet::sceneObjects
protected