Geometry associated to a Joint. More...
#include <hpp/model/body.hh>
Public Member Functions | |
JointPtr_t | joint () const |
Get joint holding the body. | |
void | joint (JointPtr_t joint) |
Set joint holding the body. | |
const fcl::Vec3f & | localCenterOfMass () const |
void | localCenterOfMass (const fcl::Vec3f &localCenterOfMass) |
Set postion of center of mass in joint reference frame. | |
const matrix3_t & | inertiaMatrix () const |
Get Intertia matrix expressed in joint local reference frame. | |
void | inertiaMatrix (const matrix3_t &inertiaMatrix) |
Set inertia matrix. | |
value_type | mass () const |
Get mass. | |
void | mass (value_type mass) |
Set mass. | |
Construction and copy and destruction | |
Constructor | |
Body () | |
Body (const Body &body) | |
Copy constructor. | |
BodyPtr_t | clone (const JointPtr_t &joint) const |
Clone body and attach to given joint. | |
virtual | ~Body () |
Name | |
void | name (const std::string &name) |
Set name. | |
std::string | name () const |
Get name. | |
Inner objects | |
virtual void | addInnerObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Add an object to the body. | |
virtual void | removeInnerObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Remove an object to the body. | |
const ObjectVector_t & | innerObjects (Request_t type) const |
Access to inner objects. | |
value_type | radius () const |
Get radius. | |
Outer objects | |
virtual void | addOuterObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Add an object as obstacle for this body. | |
virtual void | removeOuterObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Remove an obstacle to the body. | |
const ObjectVector_t & | outerObjects (Request_t type) const |
Access to outer objects. | |
Collision and distance computation | |
bool | collisionTest () const |
Test for collision. | |
void | computeDistances (DistanceResults_t &results, DistanceResults_t::size_type &offset) |
Compute distances between pairs of objects stored in bodies. |
Geometry associated to a Joint.
A body is a geometry container attached to a joint. The body contains objects (CollisionObject) that move with the joint and called inner objects.
Collision and distance computation is performed against other objects that can be obstacles or objects attached to other joints. These object are called outer objects for the body.
hpp::model::Body::Body | ( | const Body & | body | ) |
Copy constructor.
virtual hpp::model::Body::~Body | ( | ) | [inline, virtual] |
virtual void hpp::model::Body::addInnerObject | ( | const CollisionObjectPtr_t & | object, |
bool | collision, | ||
bool | distance | ||
) | [virtual] |
Add an object to the body.
object | object to add. Position of object is expressed in world frame. |
collision | whether this object should be considered for collision |
distance | whether this object should be considered for distance computation |
virtual void hpp::model::Body::addOuterObject | ( | const CollisionObjectPtr_t & | object, |
bool | collision, | ||
bool | distance | ||
) | [virtual] |
Add an object as obstacle for this body.
object | object to add. Position of object is expressed in world frame. |
collision | whether this object should be considered for collision |
distance | whether this object should be considered for distance computation |
BodyPtr_t hpp::model::Body::clone | ( | const JointPtr_t & | joint | ) | const |
Clone body and attach to given joint.
inner and outer object lists are filled with copies of the objects contained in the lists of this. (See CollisionObject::clone).
bool hpp::model::Body::collisionTest | ( | ) | const |
Test for collision.
void hpp::model::Body::computeDistances | ( | DistanceResults_t & | results, |
DistanceResults_t::size_type & | offset | ||
) |
Compute distances between pairs of objects stored in bodies.
const matrix3_t& hpp::model::Body::inertiaMatrix | ( | ) | const [inline] |
Get Intertia matrix expressed in joint local reference frame.
void hpp::model::Body::inertiaMatrix | ( | const matrix3_t & | inertiaMatrix | ) | [inline] |
Set inertia matrix.
const ObjectVector_t& hpp::model::Body::innerObjects | ( | Request_t | type | ) | const |
Access to inner objects.
type | Collision or distance |
JointPtr_t hpp::model::Body::joint | ( | ) | const [inline] |
Get joint holding the body.
void hpp::model::Body::joint | ( | JointPtr_t | joint | ) | [inline] |
const fcl::Vec3f& hpp::model::Body::localCenterOfMass | ( | ) | const [inline] |
void hpp::model::Body::localCenterOfMass | ( | const fcl::Vec3f & | localCenterOfMass | ) | [inline] |
Set postion of center of mass in joint reference frame.
value_type hpp::model::Body::mass | ( | ) | const [inline] |
Get mass.
void hpp::model::Body::mass | ( | value_type | mass | ) | [inline] |
Set mass.
void hpp::model::Body::name | ( | const std::string & | name | ) | [inline] |
std::string hpp::model::Body::name | ( | ) | const [inline] |
Get name.
const ObjectVector_t& hpp::model::Body::outerObjects | ( | Request_t | type | ) | const |
Access to outer objects.
type | Collision or distance |
value_type hpp::model::Body::radius | ( | ) | const [inline] |
Get radius.
Radius is defined as an upper-bound to the distance of all points of the body to the origin of the joint that holds the body.
virtual void hpp::model::Body::removeInnerObject | ( | const CollisionObjectPtr_t & | object, |
bool | collision, | ||
bool | distance | ||
) | [virtual] |
Remove an object to the body.
object | object to remove |
collision | whether this object should be removed from list of collision objects |
distance | whether this object should be removed from list of distance computation objects |
virtual void hpp::model::Body::removeOuterObject | ( | const CollisionObjectPtr_t & | object, |
bool | collision, | ||
bool | distance | ||
) | [virtual] |
Remove an obstacle to the body.
object | object to remove |
collision | whether this object should be removed from list of collision objects |
distance | whether this object should be removed from list of distance computation objects |