Choreonoid  1.1
構成 | Public メソッド | Protected 変数 | すべてのメンバ一覧
クラス cnoid::WorldBase

#include <World.h>

cnoid::WorldBaseに対する継承グラフ
cnoid::World< TConstraintForceSolver >

構成

struct  BodyInfo
struct  LinkPairKey

Public メソッド

 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

Protected 変数

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< 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< 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

このクラスの説明は次のファイルから生成されました: