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

Public Types

enum  { Options = 0 }
 
typedef std::vector< CollisionPairCollisionPairVector
 
typedef container::aligned_vector< GeometryObjectGeometryObjectVector
 
typedef pinocchio::GeomIndex GeomIndex
 
typedef double Scalar
 
typedef SE3Tpl< Scalar, Options > SE3
 

Public Member Functions

void addAllCollisionPairs ()
 Add all possible collision pairs. 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...
 
template<typename S2 , int O2, template< typename, int > class _JointCollectionTpl>
PINOCCHIO_DEPRECATED GeomIndex addGeometryObject (GeometryObject object, const ModelTpl< S2, O2, _JointCollectionTpl > &model, const bool autofillJointParent)
 Add a geometry object to a GeometryModel. More...
 
template<typename S2 , int O2, template< typename, int > class _JointCollectionTpl>
GeomIndex addGeometryObject (const GeometryObject &object, const ModelTpl< S2, O2, _JointCollectionTpl > &model)
 Add a geometry object to a GeometryModel and set its parent joint. More...
 
GeomIndex addGeometryObject (const GeometryObject &object)
 Add a geometry object to a GeometryModel. More...
 
bool existCollisionPair (const CollisionPair &pair) const
 Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair & pair). More...
 
bool existGeometryName (const std::string &name) const
 Check if a GeometryObject given by its name exists. More...
 
PairIndex findCollisionPair (const CollisionPair &pair) const
 Return the index of a given collision pair in collisionPairs. More...
 
GeomIndex getGeometryId (const std::string &name) const
 Return the index of a GeometryObject given by its name. More...
 
PINOCCHIO_DEPRECATED const std::string & getGeometryName (const GeomIndex index) const
 Get the name of a GeometryObject given by its index. More...
 
void removeAllCollisionPairs ()
 Remove all collision pairs from collisionPairs. Same as collisionPairs.clear().
 
void removeCollisionPair (const CollisionPair &pair)
 Remove if exists the CollisionPair from the vector collision_pairs. More...
 

Public Attributes

CollisionPairVector collisionPairs
 Vector of collision pairs.
 
GeometryObjectVector geometryObjects
 Vector of GeometryObjects used for collision computations.
 
Index ngeoms
 The number of GeometryObjects.
 

Friends

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

Detailed Description

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

Member Function Documentation

void addAllCollisionPairs ( )

Add all possible collision pairs.

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

Referenced by GeometryModel::addGeometryObject().

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.

Parameters
[in]pairThe CollisionPair to add.

Referenced by GeometryModel::addGeometryObject().

PINOCCHIO_DEPRECATED GeomIndex addGeometryObject ( GeometryObject  object,
const ModelTpl< S2, O2, _JointCollectionTpl > &  model,
const bool  autofillJointParent 
)
inline

Add a geometry object to a GeometryModel.

Deprecated:
This method has been set to deprecated. Please use other signature of addGeometryObject.
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 71 of file multibody/geometry.hpp.

References GeometryModel::addAllCollisionPairs(), GeometryModel::addCollisionPair(), GeometryModel::existCollisionPair(), GeometryModel::existGeometryName(), GeometryModel::findCollisionPair(), GeometryModel::getGeometryId(), GeometryModel::getGeometryName(), pinocchio::name(), GeometryModel::removeAllCollisionPairs(), and GeometryModel::removeCollisionPair().

GeomIndex addGeometryObject ( const GeometryObject object,
const ModelTpl< S2, O2, _JointCollectionTpl > &  model 
)

Add a geometry object to a GeometryModel and set its parent joint.

Parameters
[in]objectObject
[in]modelCorresponding model, used to assert the attributes of object.
Returns
The index of the new added GeometryObject in geometryObjects
Note
object is a nonconst copy to ease the insertion code.
GeomIndex addGeometryObject ( const GeometryObject object)

Add a geometry object to a GeometryModel.

Parameters
[in]objectObject
Returns
The index of the new added GeometryObject in geometryObjects.
bool existCollisionPair ( const CollisionPair pair) const

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.

Referenced by GeometryModel::addGeometryObject().

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

Check if a GeometryObject given by its name exists.

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

Referenced by GeometryModel::addGeometryObject().

PairIndex findCollisionPair ( const CollisionPair pair) const

Return the index of a given collision pair in collisionPairs.

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

Referenced by GeometryModel::addGeometryObject().

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

Return the index of a GeometryObject given by its name.

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

Referenced by GeometryModel::addGeometryObject().

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

Get the name of a GeometryObject given by its index.

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

Referenced by GeometryModel::addGeometryObject().

void removeCollisionPair ( const CollisionPair pair)

Remove if exists the CollisionPair from the vector collision_pairs.

Parameters
[in]pairThe CollisionPair to remove.

Referenced by GeometryModel::addGeometryObject().


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