Choreonoid  1.1
クラス | 公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cnoid::WorldBase クラス

#include <World.h>

cnoid::WorldBase の継承関係図
cnoid::World< TConstraintForceSolver > cnoid::World< cnoid::ConstraintForceSolver >

クラス

struct  BodyInfo
 

公開メンバ関数

 WorldBase ()
 
virtual ~WorldBase ()
 
int numBodies ()
 get the number of bodies in this world [詳解]
 
BodyPtr body (int index)
 get body by index [詳解]
 
BodyPtr body (const std::string &name)
 get body by name [詳解]
 
ForwardDynamicsPtr forwardDynamics (int index)
 get forward dynamics computation method for body [詳解]
 
int bodyIndex (const std::string &name)
 get index of body by name [詳解]
 
int addBody (BodyPtr body)
 add body to this world [詳解]
 
void clearBodies ()
 clear bodies in this world [詳解]
 
void clearCollisionPairs ()
 clear collision pairs [詳解]
 
void setTimeStep (double dt)
 set time step [詳解]
 
double timeStep (void) const
 get time step [詳解]
 
void setCurrentTime (double tm)
 set current time [詳解]
 
double currentTime (void) const
 get current time [詳解]
 
void setGravityAcceleration (const Vector3 &g)
 set gravity acceleration [詳解]
 
const Vector3gravityAcceleration ()
 get gravity acceleration [詳解]
 
void enableSensors (bool on)
 enable/disable sensor simulation [詳解]
 
void setEulerMethod ()
 choose euler method for integration [詳解]
 
void setRungeKuttaMethod ()
 choose runge-kutta method for integration [詳解]
 
virtual void initialize ()
 initialize this world. This must be called after all bodies are registered. [詳解]
 
virtual void calcNextState ()
 compute forward dynamics and update current state [詳解]
 
std::pair< int, bool > getIndexOfLinkPairs (Link *link1, Link *link2)
 get index of link pairs [詳解]
 

限定公開変数類

double currentTime_
 
double timeStep_
 
std::vector< BodyInfobodyInfoArray
 
bool sensorsAreEnabled
 

構築子と解体子

WorldBase::WorldBase ( )
WorldBase::~WorldBase ( )
virtual

関数詳解

int WorldBase::addBody ( BodyPtr  body)

add body to this world

引数
body
戻り値
index of the body
覚え書き
This must be called before initialize() is called.
BodyPtr WorldBase::body ( int  index)

get body by index

引数
indexof the body
戻り値
body
BodyPtr WorldBase::body ( const std::string &  name)

get body by name

引数
nameof the body
戻り値
body
int WorldBase::bodyIndex ( const std::string &  name)

get index of body by name

引数
nameof the body
戻り値
index of the body
void WorldBase::calcNextState ( )
virtual

compute forward dynamics and update current state

cnoid::World< TConstraintForceSolver >, cnoid::World< cnoid::ConstraintForceSolver >で再実装されています。

void WorldBase::clearBodies ( )

clear bodies in this world

void WorldBase::clearCollisionPairs ( )

clear collision pairs

double cnoid::WorldBase::currentTime ( void  ) const
inline

get current time

戻り値
current time[s]
void WorldBase::enableSensors ( bool  on)

enable/disable sensor simulation

引数
ontrue to enable, false to disable
覚え書き
This must be called before initialize() is called.
ForwardDynamicsPtr cnoid::WorldBase::forwardDynamics ( int  index)
inline

get forward dynamics computation method for body

引数
indexindex of the body
戻り値
forward dynamics computation method
std::pair< int, bool > WorldBase::getIndexOfLinkPairs ( Link link1,
Link link2 
)

get index of link pairs

引数
link1link1
link2link2
戻り値
pair of index and flag. The flag is true if the pair was already registered, false othewise.
const Vector3& cnoid::WorldBase::gravityAcceleration ( )
inline

get gravity acceleration

戻り値
gravity accleration
void WorldBase::initialize ( void  )
virtual

initialize this world. This must be called after all bodies are registered.

cnoid::World< TConstraintForceSolver >, cnoid::World< cnoid::ConstraintForceSolver >で再実装されています。

int cnoid::WorldBase::numBodies ( )
inline

get the number of bodies in this world

戻り値
the number of bodies
void WorldBase::setCurrentTime ( double  tm)

set current time

引数
tmcurrent time[s]
void WorldBase::setEulerMethod ( )

choose euler method for integration

void WorldBase::setGravityAcceleration ( const Vector3 g)

set gravity acceleration

引数
ggravity acceleration[m/s^2]
void WorldBase::setRungeKuttaMethod ( )

choose runge-kutta method for integration

void WorldBase::setTimeStep ( double  dt)

set time step

引数
dttime step[s]
double cnoid::WorldBase::timeStep ( void  ) const
inline

get time step

戻り値
time step[s]

メンバ詳解

std::vector<BodyInfo> cnoid::WorldBase::bodyInfoArray
protected
double cnoid::WorldBase::currentTime_
protected
bool cnoid::WorldBase::sensorsAreEnabled
protected
double cnoid::WorldBase::timeStep_
protected

このクラス詳解は次のファイルから抽出されました: