#include <world.h>
Inheritance diagram for World:
Public Types | |
typedef std::vector< Item * > | ItemList |
typedef std::vector< Body * > | BodyList |
typedef std::vector< Force * > | ForceList |
Public Member Functions | |
World () | |
World (const World &world) | |
~World () | |
World & | operator= (const World &world) |
void | clear () |
double | time () const |
void | setTime (double t) |
double | timeScale () const |
void | setTimeScale (double timeScale) |
void | addItem (Item *item) |
void | removeItem (Item *item) |
void | deleteItem (Item *item) |
int | itemIndex (const Item *item) const |
const ItemList & | items () const |
const BodyList & | bodies () const |
const ForceList & | forces () const |
Solver * | solver () const |
void | setSolver (Solver *solver) |
Solver * | removeSolver () |
void | doCalcFn () |
bool | doEvolve (double delta) |
const QString & | name () const |
void | setName (const QString &name) |
void clear | ( | ) |
Clear world (removes all items, solver and resets time)
double time | ( | ) | const [inline] |
Get current time
void setTime | ( | double | t | ) | [inline] |
Set current time
double timeScale | ( | ) | const [inline] |
Get simulation speed scale
void setTimeScale | ( | double | timeScale | ) | [inline] |
Set simulation speed scale
void addItem | ( | Item * | item | ) |
Add new item to the world
void removeItem | ( | Item * | item | ) |
Remove item from the world (you should delete item youself)
void deleteItem | ( | Item * | item | ) | [inline] |
Delete item from the world (it actually deletes item)
Solver* solver | ( | ) | const [inline] |
Get current solver
void setSolver | ( | Solver * | solver | ) |
Set new solver (and delete the old one)
Solver * removeSolver | ( | ) |
Get current solver and remove it from world
void doCalcFn | ( | ) |
Calculate all forces
bool doEvolve | ( | double | delta | ) |
Integrate.
delta | Integration interval |
const QString& name | ( | ) | const [inline, inherited] |
Returns name of the object
void setName | ( | const QString & | name | ) | [inline, inherited] |
Set name of the object