#include <Body.h>
◆ ExtraJointType
Enumerator |
---|
EJ_PISTON | |
EJ_BALL | |
◆ Body() [1/2]
◆ Body() [2/2]
Body::Body |
( |
const Body & |
org | ) |
|
◆ ~Body()
◆ addCustomizerDirectory()
void Body::addCustomizerDirectory |
( |
const std::string & |
path | ) |
|
|
static |
◆ addDevice()
void Body::addDevice |
( |
Device * |
device | ) |
|
◆ addExtraJoint()
void cnoid::Body::addExtraJoint |
( |
const ExtraJoint & |
extraJoint | ) |
|
|
inline |
◆ bodyInterface()
◆ calcCenterOfMass()
const Vector3 & Body::calcCenterOfMass |
( |
| ) |
|
◆ calcForwardKinematics()
void cnoid::Body::calcForwardKinematics |
( |
bool |
calcVelocity = false , |
|
|
bool |
calcAcceleration = false |
|
) |
| |
|
inline |
◆ calcTotalMomentum()
◆ centerOfMass()
const Vector3 & Body::centerOfMass |
( |
| ) |
const |
◆ clearDevices()
void Body::clearDevices |
( |
| ) |
|
◆ clearExternalForces()
void Body::clearExternalForces |
( |
| ) |
|
◆ clearExtraJoints()
void cnoid::Body::clearExtraJoints |
( |
| ) |
|
|
inline |
◆ clone()
Body * Body::clone |
( |
| ) |
const |
|
virtual |
◆ cloneShapes()
◆ copy()
void Body::copy |
( |
const Body & |
org | ) |
|
|
protected |
◆ createLink()
Link * Body::createLink |
( |
const Link * |
org = 0 | ) |
const |
|
virtual |
◆ customizerHandle()
◆ customizerInterface()
◆ defaultPosition()
const Position& cnoid::Body::defaultPosition |
( |
| ) |
const |
|
inline |
◆ device()
Device* cnoid::Body::device |
( |
int |
index | ) |
const |
|
inline |
◆ devices() [1/2]
Example: DeviceList<ForceSensor> forceSensors(body->devices()); or forceSensors << body->devices();
◆ devices() [2/2]
template<class DeviceType >
DeviceList<DeviceType> cnoid::Body::devices |
( |
| ) |
const |
|
inline |
◆ extraJoint() [1/2]
◆ extraJoint() [2/2]
const ExtraJoint& cnoid::Body::extraJoint |
( |
int |
index | ) |
const |
|
inline |
◆ findCache() [1/2]
template<class T >
T* cnoid::Body::findCache |
( |
const std::string & |
name | ) |
|
|
inline |
◆ findCache() [2/2]
template<class T >
const T* cnoid::Body::findCache |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ findDevice() [1/2]
template<class DeviceType >
DeviceType* cnoid::Body::findDevice |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ findDevice() [2/2]
Device* cnoid::Body::findDevice |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ getCaches()
◆ getOrCreateCache()
template<class T >
T* cnoid::Body::getOrCreateCache |
( |
const std::string & |
name | ) |
|
|
inline |
◆ hasVirtualJointForces()
bool Body::hasVirtualJointForces |
( |
| ) |
const |
◆ info() [1/2]
const Mapping * Body::info |
( |
| ) |
const |
◆ info() [2/2]
◆ initializeDeviceStates()
void Body::initializeDeviceStates |
( |
| ) |
|
◆ initializeState()
void Body::initializeState |
( |
| ) |
|
◆ installCustomizer() [1/2]
bool Body::installCustomizer |
( |
| ) |
|
The function installs the pre-loaded customizer corresponding to the model name.
◆ installCustomizer() [2/2]
◆ isFixedRootModel()
bool cnoid::Body::isFixedRootModel |
( |
| ) |
const |
|
inline |
◆ isStaticModel()
bool cnoid::Body::isStaticModel |
( |
| ) |
const |
|
inline |
This function returns true when the whole body is a static, fixed object like a floor.
◆ joint()
Link* cnoid::Body::joint |
( |
int |
id | ) |
const |
|
inline |
This function returns a link that has a given joint ID. If there is no link that has a given joint ID, the function returns a dummy link object whose ID is minus one. If the body has virtual joints, this function returns them by giving the ids over the last one.
◆ link() [1/2]
Link* cnoid::Body::link |
( |
int |
index | ) |
const |
|
inline |
This function returns the link of a given index in the whole link sequence. The order of the sequence corresponds to a link-tree traverse from the root link. The size of the sequence can be obtained by numLinks().
◆ link() [2/2]
Link * Body::link |
( |
const std::string & |
name | ) |
const |
This function returns a link object whose name of Joint node matches a given name. Null is returned when the body has no joint of the given name.
◆ linkTraverse()
LinkTraverse object that traverses all the links from the root link
◆ mass()
double Body::mass |
( |
| ) |
const |
◆ modelName()
const std::string & Body::modelName |
( |
| ) |
const |
◆ name()
const std::string & Body::name |
( |
| ) |
const |
◆ numAllJoints()
int cnoid::Body::numAllJoints |
( |
| ) |
const |
|
inline |
The number of all the joints including both the actual and virtual joints.
◆ numDevices()
int cnoid::Body::numDevices |
( |
| ) |
const |
|
inline |
◆ numExtraJoints()
int cnoid::Body::numExtraJoints |
( |
| ) |
const |
|
inline |
◆ numJoints()
int cnoid::Body::numJoints |
( |
| ) |
const |
|
inline |
The number of the links that are actual joints. The joints given joint ids are recognized as such joints. Note that the acutal value is the maximum joint ID plus one. Thus there may be a case where the value does not correspond to the actual number of the joints with ids. In other words, the value represents the size of the link sequence obtained by joint() function.
◆ numLinks()
int cnoid::Body::numLinks |
( |
| ) |
const |
|
inline |
The number of all the links the body has. The value corresponds to the size of the sequence obtained by link() function.
◆ numVirtualJoints()
int cnoid::Body::numVirtualJoints |
( |
| ) |
const |
|
inline |
The number of the joints without joint ids. For example, a joint for simulating a spring is usually handled as such a joint. You can get the joints by giving the index after the last joint id to the joint() function.
◆ removeCache()
void Body::removeCache |
( |
const std::string & |
name | ) |
|
◆ resetDefaultPosition()
void Body::resetDefaultPosition |
( |
const Position & |
T | ) |
|
◆ resetInfo()
void Body::resetInfo |
( |
Mapping * |
info | ) |
|
◆ rootLink()
Link* cnoid::Body::rootLink |
( |
| ) |
const |
|
inline |
The root link of the body
◆ setModelName()
void Body::setModelName |
( |
const std::string & |
name | ) |
|
◆ setName()
void Body::setName |
( |
const std::string & |
name | ) |
|
◆ setRootLink()
void Body::setRootLink |
( |
Link * |
link | ) |
|
◆ setVirtualJointForces()
void Body::setVirtualJointForces |
( |
| ) |
|
◆ updateLinkTree()
void Body::updateLinkTree |
( |
| ) |
|
This function must be called when the structure of the link tree is changed.
The documentation for this class was generated from the following files: