pinocchio  UNKNOWN
GeometryModel Struct Reference
Collaboration diagram for GeometryModel:
[legend]

Public Member Functions

GeomIndex addGeometryObject (GeometryObject object, const Model &model, const bool autofillJointParent=false)
 Add a geometry object to a GeometryModel. More...
 
GeomIndex getGeometryId (const std::string &name) const
 Return the index of a GeometryObject given by its name. More...
 
bool existGeometryName (const std::string &name) const
 Check if a GeometryObject given by its name exists. More...
 
PINOCCHIO_DEPRECATED const std::string & getGeometryName (const GeomIndex index) const
 Get the name of a GeometryObject given by its index. More...
 
void addCollisionPair (const CollisionPair &pair)
 Add a collision pair into the vector of collision_pairs. The method check before if the given CollisionPair is already included. More...
 
void addAllCollisionPairs ()
 Add all possible collision pairs. More...
 
void removeCollisionPair (const CollisionPair &pair)
 Remove if exists the CollisionPair from the vector collision_pairs. More...
 
void removeAllCollisionPairs ()
 Remove all collision pairs from collisionPairs. Same as collisionPairs.clear().
 
bool existCollisionPair (const CollisionPair &pair) const
 Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair & pair). More...
 
PairIndex findCollisionPair (const CollisionPair &pair) const
 Return the index of a given collision pair in collisionPairs. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Index ngeoms
 The number of GeometryObjects.
 
container::aligned_vector< GeometryObjectgeometryObjects
 Vector of GeometryObjects used for collision computations.
 
std::vector< CollisionPaircollisionPairs
 Vector of collision pairs.
 

Friends

std::ostream & operator<< (std::ostream &os, const GeometryModel &model_geom)
 

Detailed Description

Definition at line 38 of file multibody/geometry.hpp.

Member Function Documentation

void addAllCollisionPairs ( )
inline

Add all possible collision pairs.

Note
Collision pairs between geometries of having the same parent joint are not added.

Definition at line 186 of file multibody/geometry.hxx.

References GeometryModel::addCollisionPair(), GeometryModel::geometryObjects, GeometryModel::ngeoms, and GeometryModel::removeAllCollisionPairs().

void addCollisionPair ( const CollisionPair pair)
inline

Add a collision pair into the vector of collision_pairs. The method check before if the given CollisionPair is already included.

Parameters
[in]pairThe CollisionPair to add.

Definition at line 180 of file multibody/geometry.hxx.

References GeometryModel::collisionPairs, GeometryModel::existCollisionPair(), and GeometryModel::ngeoms.

Referenced by GeometryModel::addAllCollisionPairs().

GeomIndex addGeometryObject ( GeometryObject  object,
const Model model,
const bool  autofillJointParent = false 
)
inline

Add a geometry object to a GeometryModel.

Parameters
[in]objectObject
[in]modelCorresponding model, used to assert the attributes of object.
[in]autofillJointParentif true, set jointParent from frameParent.
Returns
The index of the new added GeometryObject in geometryObjects
Note
object is a nonconst copy to ease the insertion code.

Definition at line 54 of file multibody/geometry.hxx.

References Model::frames, GeometryModel::geometryObjects, and GeometryModel::ngeoms.

bool existCollisionPair ( const CollisionPair pair) const
inline

Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair & pair).

Parameters
[in]pairThe CollisionPair.
Returns
True if the CollisionPair exists, false otherwise.

Definition at line 213 of file multibody/geometry.hxx.

References GeometryModel::collisionPairs.

Referenced by GeometryModel::addCollisionPair().

bool existGeometryName ( const std::string &  name) const
inline

Check if a GeometryObject given by its name exists.

Parameters
[in]nameName of the GeometryObject
Returns
True if the GeometryObject exists in the geometryObjects.

Definition at line 86 of file multibody/geometry.hxx.

References GeometryModel::geometryObjects, se3::name(), and GeometryObject::name.

PairIndex findCollisionPair ( const CollisionPair pair) const
inline

Return the index of a given collision pair in collisionPairs.

Parameters
[in]pairThe CollisionPair.
Returns
The index of the CollisionPair in collisionPairs.

Definition at line 220 of file multibody/geometry.hxx.

References GeometryModel::collisionPairs.

GeomIndex getGeometryId ( const std::string &  name) const
inline

Return the index of a GeometryObject given by its name.

Parameters
[in]nameName of the GeometryObject
Returns
Index of the corresponding GeometryObject

Definition at line 74 of file multibody/geometry.hxx.

References GeometryModel::geometryObjects, se3::name(), and GeometryObject::name.

const std::string & getGeometryName ( const GeomIndex  index) const
inline

Get the name of a GeometryObject given by its index.

Parameters
[in]indexIndex of the GeometryObject
Returns
Name of the GeometryObject

Definition at line 94 of file multibody/geometry.hxx.

References GeometryModel::geometryObjects.

void removeCollisionPair ( const CollisionPair pair)
inline

Remove if exists the CollisionPair from the vector collision_pairs.

Parameters
[in]pairThe CollisionPair to remove.

Definition at line 201 of file multibody/geometry.hxx.

References GeometryModel::collisionPairs, and GeometryModel::ngeoms.


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