NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgWorld Class Reference

#include <tgWorld.h>

Classes

struct  Config
 

Public Member Functions

 tgWorld ()
 
 tgWorld (const Config &config)
 
 tgWorld (const Config &config, tgGround *ground)
 
 ~tgWorld ()
 
void reset ()
 
void reset (const Config &config)
 
void reset (tgGround *ground)
 
void step (double dt) const
 
tgWorldImplimplementation () const
 
double getWorldGravity () const
 

Detailed Description

Represents the world in which the Tensegrities operate, including terrain, gravity and atmospheric conditions.

Definition at line 37 of file tgWorld.h.

Constructor & Destructor Documentation

tgWorld::tgWorld ( )

Construct with the default configuration.

Todo:
Use the factory method design pattern to create the m_pImpl object.

Definition at line 49 of file tgWorld.cpp.

tgWorld::tgWorld ( const Config config)

Construct with a supplied configuration.

Parameters
[in]configa tgWorld::Config
Todo:
Use the factory method design pattern to create the m_pImpl object.

Definition at line 62 of file tgWorld.cpp.

tgWorld::tgWorld ( const Config config,
tgGround ground 
)

Construct with a supplied configuration and a supplied ground

Parameters
[in]configa tgWorld::Config
[in]grounda tgGround, stored in pointer m_pGround
Todo:
can we make the ground const?
Todo:
Use the factory method design pattern to create the m_pImpl object.

Definition at line 75 of file tgWorld.cpp.

tgWorld::~tgWorld ( )

Delete the implementation.

Definition at line 84 of file tgWorld.cpp.

Member Function Documentation

double tgWorld::getWorldGravity ( ) const

Returns the level of gravity in this world.

Definition at line 135 of file tgWorld.cpp.

tgWorldImpl& tgWorld::implementation ( ) const
inline

Return a pointer to the implementation.

Returns
a pointer to the implementation; may be NULL. Consider making this private, and making its clients friends.

Definition at line 108 of file tgWorld.h.

void tgWorld::reset ( )

Replace the implementation.

Definition at line 90 of file tgWorld.cpp.

Here is the caller graph for this function:

void tgWorld::reset ( const Config config)

Replace the implementation with a new config.

Parameters
[in]configconfiguration POD

Definition at line 98 of file tgWorld.cpp.

Here is the call graph for this function:

void tgWorld::reset ( tgGround ground)

Replace the implementation with a new ground.

Parameters
[in]groundthe new ground

Definition at line 109 of file tgWorld.cpp.

Here is the call graph for this function:

void tgWorld::step ( double  dt) const

Advance the simulation.

Parameters
[in]dtthe number of seconds since the previous call; std::invalid_argument is thrown if dt is not positive

Definition at line 119 of file tgWorld.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: