#include <world.hh>
Inheritance diagram for anoid::main::World:


Public Methods | |
| virtual base::Object * | loadObject (const std::string &name) |
| virtual int | getFreshID () |
| World (config::Configuration &c, context::Context *context, double g=6.6726E-11) | |
| virtual void | init (config::Configuration &c) |
| virtual double | getTime () |
| virtual double | getG () |
| virtual vector< base::Object * >::iterator | begin () |
| virtual vector< base::Object * >::iterator | end () |
| virtual base::Object * | add (base::Object *o) |
| virtual std::vector< base::Element * >::iterator | beginE () |
| virtual std::vector< base::Element * >::iterator | endE () |
| virtual void | update () |
| virtual void | redraw () |
| virtual void | send (base::Event *e) |
| virtual void | listen (base::Object *o, const std::string &m) |
| virtual void | fireEvents () |
| virtual base::Event * | loadEvent (const std::string &name) |
| virtual base::Event * | loadEvent (const std::string &name, config::Configuration &c) |
| virtual base::Event * | sendEvent (const std::string &name) |
| virtual base::Event * | sendEvent (const std::string &name, base::Object *o1) |
| virtual base::Event * | sendEvent (const std::string &name, base::Object *o1, base::Object *o2) |
| virtual base::Event * | sendEvent (const std::string &name, base::Object *o1, base::Object *o2, base::Object *o3) |
| virtual context::Context * | getContext () |
Private Attributes | |
| Uint32 | old |
| int | maxid |
| double | time |
| How much has time progressed since we last rendered? | |
| double | G |
| The constant of gravity. | |
| std::vector< base::Element * > | childrenE |
| std::deque< base::Event * > | events |
| string_map< vector< base::Object * > > | listeners |
| context::Context * | _context |
|
||||||||||||||||
|
Construct a new World (whoa, talk about playing God :)
Definition at line 34 of file world.cc. References anoid::main::context, init(), and anoid::base::Object::world. |
|
|
Definition at line 99 of file world.cc. References childrenE. |
|
|
Get an iterator of all children
Implements anoid::base::AbstractWorld. Definition at line 91 of file world.cc. References anoid::base::Object::children. |
|
|
Implements anoid::base::AbstractWorld. Definition at line 41 of file world.hh. References childrenE. |
|
|
Implements anoid::base::AbstractWorld. Definition at line 95 of file world.cc. References anoid::base::Object::children. |
|
|
Implements anoid::base::AbstractWorld. Definition at line 42 of file world.hh. References childrenE. |
|
|
Implements anoid::base::AbstractWorld. Definition at line 130 of file world.cc. References events, anoid::simple::i(), anoid::simple::j(), and listeners. |
|
|
Implements anoid::base::AbstractWorld. |
|
|
Get a fresh ID, which is unique in this world (this is used for serialisation on the network)
Implements anoid::base::AbstractWorld. Definition at line 83 of file world.cc. References maxid. |
|
|
Implements anoid::base::AbstractWorld. Definition at line 37 of file world.hh. References G. |
|
|
Get time passed since last update (used for position calculations from velocity etc.)
Implements anoid::base::AbstractWorld. Definition at line 36 of file world.hh. References time. |
|
|
This is the real initialiser. It should take it's parameters from the provided configuration
Reimplemented from anoid::base::Object. Definition at line 39 of file world.cc. Referenced by World(). |
|
||||||||||||
|
Definition at line 123 of file world.cc. References anoid::main::collisionCallback(), and listeners. |
|
||||||||||||
|
Convenience method for loading an event and initialise it with some a configuration
Implements anoid::base::AbstractWorld. Definition at line 53 of file world.cc. References loadObject(). |
|
|
Convenience method for loading an event
Implements anoid::base::AbstractWorld. Definition at line 48 of file world.cc. References loadObject(). Referenced by sendEvent(). |
|
|
Implements anoid::base::AbstractWorld. Definition at line 87 of file world.cc. Referenced by loadEvent(). |
|
|
Called just after update has been called on the entire world. This should draw the objects (using OpenGL). Reimplemented from anoid::base::Object. |
|
|
Definition at line 119 of file world.cc. References events. Referenced by sendEvent(). |
|
||||||||||||||||||||
|
Definition at line 77 of file world.cc. References sendEvent(). |
|
||||||||||||||||
|
Definition at line 71 of file world.cc. References sendEvent(). |
|
||||||||||||
|
Definition at line 65 of file world.cc. References sendEvent(). |
|
|
Convenience methof for loading and sending an event
Implements anoid::base::AbstractWorld. Definition at line 59 of file world.cc. References loadEvent(), and send(). Referenced by sendEvent(). |
|
|
Called when the main loop is ready for another step. Should be used to perform any calculations prior to movement. Reimplemented from anoid::base::Object. |
|
|
|
|
|
|
|
|
Definition at line 21 of file world.hh. Referenced by fireEvents(), and send(). |
|
|
The constant of gravity.
|
|
|
Definition at line 22 of file world.hh. Referenced by fireEvents(), and listen(). |
|
|
Definition at line 15 of file world.hh. Referenced by getFreshID(). |
|
|
|
|
|
How much has time progressed since we last rendered?
|