Geometry associated to a Joint. More...
#include <hpp/model/body.hh>
Public Member Functions | |
JointPtr_t | joint () const |
Get joint holding the body. More... | |
void | joint (JointPtr_t joint) |
Set joint holding the body. More... | |
Construction and copy and destruction | |
Constructor | |
Body () | |
Body (const Body &body) | |
Copy constructor. More... | |
BodyPtr_t | clone (const JointPtr_t &joint) const |
Clone body and attach to given joint. More... | |
virtual | ~Body () |
Name | |
void | name (const std::string &name) |
Set name. More... | |
std::string | name () const |
Get name. More... | |
Inner objects | |
virtual void | addInnerObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Add an object to the body. More... | |
virtual void | removeInnerObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Remove an object to the body. More... | |
const ObjectVector_t & | innerObjects (Request_t type) const |
Access to inner objects. More... | |
value_type | radius () const |
Get radius. More... | |
Outer objects | |
virtual void | addOuterObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Add an object as obstacle for this body. More... | |
virtual void | removeOuterObject (const CollisionObjectPtr_t &object, bool collision, bool distance) |
Remove an obstacle to the body. More... | |
const ObjectVector_t & | outerObjects (Request_t type) const |
Access to outer objects. More... | |
Collision and distance computation | |
bool | collisionTest () const |
Test for collision. More... | |
void | computeDistances (DistanceResults_t &results, DistanceResults_t::size_type &offset) |
Compute distances between pairs of objects stored in bodies. More... | |
Inertial information | |
Get position of center of mass in joint local reference frame. | |
const fcl::Vec3f & | localCenterOfMass () const |
void | localCenterOfMass (const fcl::Vec3f &localCenterOfMass) |
Set postion of center of mass in joint reference frame. More... | |
const matrix3_t & | inertiaMatrix () const |
Get Intertia matrix expressed in joint local reference frame. More... | |
void | inertiaMatrix (const matrix3_t &inertiaMatrix) |
Set inertia matrix. More... | |
value_type | mass () const |
Get mass. More... | |
void | mass (value_type mass) |
Set mass. More... | |
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 | ( | ) |
hpp::model::Body::Body | ( | const Body & | body | ) |
Copy constructor.
|
inlinevirtual |
|
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 |
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.
|
inline |
Get Intertia matrix expressed in joint local reference frame.
|
inline |
Set inertia matrix.
const ObjectVector_t& hpp::model::Body::innerObjects | ( | Request_t | type | ) | const |
Access to inner objects.
type | Collision or distance |
|
inline |
Get joint holding the body.
|
inline |
|
inline |
|
inline |
Set postion of center of mass in joint reference frame.
|
inline |
Get mass.
|
inline |
Set mass.
|
inline |
|
inline |
Get name.
const ObjectVector_t& hpp::model::Body::outerObjects | ( | Request_t | type | ) | const |
Access to outer objects.
type | Collision or distance |
|
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 |
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 |
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 |