• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

step/stepcore

  • StepCore
  • World
Public Member Functions | List of all members
StepCore::World Class Reference
World

#include <world.h>

Inheritance diagram for StepCore::World:
Inheritance graph
[legend]

Public Member Functions

 World ()
 
 World (const World &world)
 
 ~World ()
 
const BodyList & bodies () const
 
void clear ()
 
CollisionSolver * collisionSolver () const
 
ConstraintSolver * constraintSolver () const
 
int doCalcFn ()
 
int doEvolve (double delta)
 
bool errorsCalculation () const
 
bool evolveAbort ()
 
const ForceList & forces () const
 
const JointList & joints () const
 
Object * object (const QString &name)
 
World & operator= (const World &world)
 
CollisionSolver * removeCollisionSolver ()
 
ConstraintSolver * removeConstraintSolver ()
 
Solver * removeSolver ()
 
void setCollisionSolver (CollisionSolver *collisionSolver)
 
void setConstraintSolver (ConstraintSolver *constraintSolver)
 
void setErrorsCalculation (bool errorsCalculation)
 
void setEvolveAbort (bool evolveAbort=true)
 
void setSolver (Solver *solver)
 
void setTime (double t)
 
void setTimeScale (double timeScale)
 
Solver * solver () const
 
double time () const
 
double timeScale () const
 
- Public Member Functions inherited from StepCore::ItemGroup
 ItemGroup (const QString &name=QString())
 
 ItemGroup (const ItemGroup &group)
 
 ~ItemGroup ()
 
virtual void addItem (Item *item)
 
ItemList allItems () const
 
void allItems (ItemList *items) const
 
Item * childItem (int index) const
 
Item * childItem (const QString &name) const
 
int childItemCount () const
 
int childItemIndex (const Item *item) const
 
void clear ()
 
virtual void deleteItem (Item *item)
 
Item * item (const QString &name) const
 
const ItemList & items () const
 
ItemGroup & operator= (const ItemGroup &group)
 
virtual void removeItem (Item *item)
 
void setWorld (World *world)
 
void worldItemRemoved (Item *item)
 
- Public Member Functions inherited from StepCore::Item
 Item (const QString &name=QString())
 
 Item (const Item &item)
 
virtual ~Item ()
 
Color color () const
 
void deleteObjectErrors ()
 
ItemGroup * group () const
 
ObjectErrors * objectErrors ()
 
Item & operator= (const Item &item)
 
void setColor (Color color)
 
virtual void setGroup (ItemGroup *group)
 
ObjectErrors * tryGetObjectErrors () const
 
World * world () const
 
virtual void worldItemRemoved (Item *item STEPCORE_UNUSED)
 
- Public Member Functions inherited from StepCore::Object
 Object (const QString &name=QString())
 
virtual ~Object ()
 
const QString & name () const
 
void setName (const QString &name)
 

Additional Inherited Members

- Protected Member Functions inherited from StepCore::Item
virtual ObjectErrors * createObjectErrors ()
 
- Protected Attributes inherited from StepCore::Object
QString _name
 

Detailed Description

Contains multiple Item, Solver and general properties such as time.

Todo:
Redesign to avoid variable copying (scatter/gatherVariables)

Definition at line 372 of file world.h.

Constructor & Destructor Documentation

StepCore::World::World ( )

Constructs empty World.

Definition at line 259 of file world.cc.

StepCore::World::World ( const World &  world)

Constructs a copy of world (deep copy)

Definition at line 269 of file world.cc.

StepCore::World::~World ( )

Destroys World and all objects which belongs to it.

Definition at line 277 of file world.cc.

Member Function Documentation

const BodyList& StepCore::World::bodies ( ) const
inline

Get list of all items (not including sub-items) in the World.

Get list of all bodies (including sub-items) in the World

Definition at line 427 of file world.h.

void StepCore::World::clear ( )

Clear world (removes all items, solver and resets time)

Definition at line 282 of file world.cc.

CollisionSolver* StepCore::World::collisionSolver ( ) const
inline

Get current CollisionSolver.

Definition at line 441 of file world.h.

ConstraintSolver* StepCore::World::constraintSolver ( ) const
inline

Get current ConstraintSolver.

Definition at line 448 of file world.h.

int StepCore::World::doCalcFn ( )

Calculate all forces.

Definition at line 685 of file world.cc.

int StepCore::World::doEvolve ( double  delta)

Integrate.

Parameters
deltaIntegration interval
Returns
the same as Solver::doEvolve
Todo:
Provide error message

Definition at line 699 of file world.cc.

bool StepCore::World::errorsCalculation ( ) const
inline

Is errors calculation enabled.

Definition at line 403 of file world.h.

bool StepCore::World::evolveAbort ( )
inline

Get evolveAbort flag (can be called from separate thread)

Definition at line 464 of file world.h.

const ForceList& StepCore::World::forces ( ) const
inline

Get list of all forces (including sub-items) in the World.

Definition at line 429 of file world.h.

const JointList& StepCore::World::joints ( ) const
inline

Get list of all joints (including sub-items) in the World.

Definition at line 431 of file world.h.

Object * StepCore::World::object ( const QString &  name)

Add new item to the world.

Remove item from the world (you should delete item youself) Delete item from the world (it actually deletes item) Finds item in items() Get item by its index Get item by its name Get object (item, solver, *Solver or worls itself) by its name

Definition at line 549 of file world.cc.

World & StepCore::World::operator= ( const World &  world)

Assignment operator (deep copy)

Definition at line 323 of file world.cc.

CollisionSolver * StepCore::World::removeCollisionSolver ( )

Get current CollisionSolver and remove it from world.

Definition at line 583 of file world.cc.

ConstraintSolver * StepCore::World::removeConstraintSolver ( )

Get current ConstraintSolver and remove it from world.

Definition at line 596 of file world.cc.

Solver * StepCore::World::removeSolver ( )

Get current Solver and remove it from world.

Definition at line 570 of file world.cc.

void StepCore::World::setCollisionSolver ( CollisionSolver *  collisionSolver)

Set new CollisionSolver (and delete the old one)

Definition at line 577 of file world.cc.

void StepCore::World::setConstraintSolver ( ConstraintSolver *  constraintSolver)

Set new ConstraintSolver (and delete the old one)

Definition at line 590 of file world.cc.

void StepCore::World::setErrorsCalculation ( bool  errorsCalculation)
inline

Enable or disable errors calculation.

Definition at line 405 of file world.h.

void StepCore::World::setEvolveAbort ( bool  evolveAbort = true)
inline

Set evolveAbort flag (can be called from separate thread).

When the flag is set current (or any subsequent) doEvolve operation will be aborted as soon as possible.

Definition at line 467 of file world.h.

void StepCore::World::setSolver ( Solver *  solver)

Set new Solver (and delete the old one)

Definition at line 559 of file world.cc.

void StepCore::World::setTime ( double  t)
inline

Set current time.

Definition at line 395 of file world.h.

void StepCore::World::setTimeScale ( double  timeScale)
inline

Set simulation speed scale.

Definition at line 400 of file world.h.

Solver* StepCore::World::solver ( ) const
inline

Get current Solver.

Definition at line 434 of file world.h.

double StepCore::World::time ( ) const
inline

Get current time.

Definition at line 393 of file world.h.

double StepCore::World::timeScale ( ) const
inline

Get simulation speed scale.

Definition at line 398 of file world.h.


The documentation for this class was generated from the following files:
  • world.h
  • world.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal