#include <DyWorld.h>
◆ WorldBase()
◆ ~WorldBase()
WorldBase::~WorldBase |
( |
| ) |
|
|
virtual |
◆ addBody() [1/2]
int WorldBase::addBody |
( |
DyBody * |
body | ) |
|
add body to this world
- Parameters
-
- Returns
- index of the body
- Note
- This must be called before initialize() is called.
◆ addBody() [2/2]
Use this method instead of addBody(const DyBodyPtr& body) when you want to specify a forward dynamics calculater.
◆ body() [1/2]
DyBody * WorldBase::body |
( |
int |
index | ) |
const |
get body by index
- Parameters
-
- Returns
- body
◆ body() [2/2]
DyBody * WorldBase::body |
( |
const std::string & |
name | ) |
const |
get body by name
- Parameters
-
- Returns
- body
◆ bodyIndex()
int WorldBase::bodyIndex |
( |
const std::string & |
name | ) |
const |
get index of body by name
- Parameters
-
- Returns
- index of the body
◆ calcNextState()
void WorldBase::calcNextState |
( |
| ) |
|
|
virtual |
◆ clearBodies()
void WorldBase::clearBodies |
( |
| ) |
|
clear bodies in this world
◆ clearCollisionPairs()
void WorldBase::clearCollisionPairs |
( |
| ) |
|
◆ currentTime()
double cnoid::WorldBase::currentTime |
( |
void |
| ) |
const |
|
inline |
get current time
- Returns
- current time[s]
◆ enableSensors()
void WorldBase::enableSensors |
( |
bool |
on | ) |
|
enable/disable sensor simulation
- Parameters
-
on | true to enable, false to disable |
- Note
- This must be called before initialize() is called.
◆ forwardDynamics()
get forward dynamics computation method for body
- Parameters
-
- Returns
- forward dynamics computation method
◆ getIndexOfLinkPairs()
std::pair< int, bool > WorldBase::getIndexOfLinkPairs |
( |
DyLink * |
link1, |
|
|
DyLink * |
link2 |
|
) |
| |
get index of link pairs
- Parameters
-
- Returns
- pair of index and flag. The flag is true if the pair was already registered, false othewise.
◆ gravityAcceleration()
const Vector3& cnoid::WorldBase::gravityAcceleration |
( |
| ) |
const |
|
inline |
get gravity acceleration
- Returns
- gravity accleration
◆ initialize()
void WorldBase::initialize |
( |
void |
| ) |
|
|
virtual |
◆ numBodies()
int cnoid::WorldBase::numBodies |
( |
| ) |
const |
|
inline |
get the number of bodies in this world
- Returns
- the number of bodies
◆ setCurrentTime()
void WorldBase::setCurrentTime |
( |
double |
tm | ) |
|
set current time
- Parameters
-
◆ setEulerMethod()
void WorldBase::setEulerMethod |
( |
| ) |
|
choose euler method for integration
◆ setGravityAcceleration()
void WorldBase::setGravityAcceleration |
( |
const Vector3 & |
g | ) |
|
set gravity acceleration
- Parameters
-
g | gravity acceleration[m/s^2] |
◆ setOldAccelSensorCalcMode()
void WorldBase::setOldAccelSensorCalcMode |
( |
bool |
on | ) |
|
◆ setRungeKuttaMethod()
void WorldBase::setRungeKuttaMethod |
( |
| ) |
|
choose runge-kutta method for integration
◆ setTimeStep()
void WorldBase::setTimeStep |
( |
double |
dt | ) |
|
◆ setVirtualJointForces()
void WorldBase::setVirtualJointForces |
( |
| ) |
|
◆ timeStep()
double cnoid::WorldBase::timeStep |
( |
void |
| ) |
const |
|
inline |
get time step
- Returns
- time step[s]
◆ bodyInfoArray
std::vector<BodyInfo> cnoid::WorldBase::bodyInfoArray |
|
protected |
◆ currentTime_
double cnoid::WorldBase::currentTime_ |
|
protected |
◆ isOldAccelSensorCalcMode
bool cnoid::WorldBase::isOldAccelSensorCalcMode |
|
protected |
◆ sensorsAreEnabled
bool cnoid::WorldBase::sensorsAreEnabled |
|
protected |
◆ timeStep_
double cnoid::WorldBase::timeStep_ |
|
protected |
The documentation for this class was generated from the following files: