#include <Simulator.h>
Inheritance diagram for Simulator:
Definition at line 13 of file Simulator.h.
|
Definition at line 9 of file Simulator.cpp. References contacts, contactSolver, dtDefault, isContact, and realTime. |
|
Definition at line 23 of file Simulator.cpp. References deleteObjects(). |
|
Performs a timestep. It needs to be virtual because of the use of abstract Simulator classes in GUI-related base classes. This method may be overridden to include fitness computing, agent tracking etc. Implements World. Definition at line 51 of file Simulator.cpp. References applyMouseForce(), ContactSolver::computeContacts(), contacts, contactSolver, controll(), deleteContacts(), detectContacts(), fillContactMatrix(), Integrator::getDt(), indexContacts(), integrator, isContact, objects, realTime, and ContactSolver::uploadForces(). |
|
Adds the mouse force to the external forces (and torques) of the object dragged with the mouse. Definition at line 262 of file Simulator.cpp. References PhysicalObject::alpha, draggedObject, PhysicalObject::externalForce, PhysicalObject::externalTorque, PhysicalObject::r, Vector2::rotate(), Vector2::x, and Vector2::y. Referenced by advanceTime(). |
|
Definition at line 225 of file Simulator.cpp. References ContactSolver::computeContacts(), and contactSolver. |
|
Definition at line 45 of file Simulator.cpp. References PhysicalObject::controll(), and objects. Referenced by advanceTime(). |
|
Deletes all previous contact information: the global vector of contacts, and the contacts of all objects. Definition at line 229 of file Simulator.cpp. References contacts, and objects. Referenced by advanceTime(). |
|
Deletes the object list and the included objects. Definition at line 41 of file Simulator.cpp. References objects, and purgeContainer(). Referenced by ~Simulator(). |
|
Reimplemented in IunctusSimulator. Definition at line 135 of file Simulator.cpp. References contacts, PhysicalObject::detectContacts(), Simulator::ObjectPair::o1, sortedObjects, sortObjects(), xContacts, and xyContacts. Referenced by advanceTime(), IunctusSimulator::detectContacts(), and ComposedPhysicalObject::detectContacts(). |
|
Reimplemented from World. Definition at line 279 of file Simulator.cpp. References World::draw(), objects, and GUI::setBrushColor(). |
|
Computes the matrix used for contact force computation. Definition at line 212 of file Simulator.cpp. References contacts, and contactSolver. Referenced by advanceTime(). |
|
Reimplemented from World. Definition at line 18 of file Simulator.h. References Integrator::getDt(), and integrator. |
|
Indexes the contacts, resets to zero the contact data structures, allocates memory for them if needed. Definition at line 198 of file Simulator.cpp. References PhysicalObject::alpha, contacts, contactSolver, and ContactSolver::init(). Referenced by advanceTime(). |
|
Reimplemented from World. Definition at line 61 of file Simulator.h. References World::onMouseLeftDown(), and setMouseForce(). |
|
Reimplemented from World. Definition at line 66 of file Simulator.h. References World::onMouseLeftUp(), and unsetMouseForce(). |
|
Adds the object to the objects array. Definition at line 30 of file Simulator.cpp. References objects, PhysicalObject::registerPrimitives(), and sortedObjects. Referenced by IunctusSimulator::IunctusSimulator(), PacSimulator::PacSimulator(), and SpherusSimulator::SpherusSimulator(). |
|
Adds the object to the primitives array. Definition at line 37 of file Simulator.cpp. References primitives. Referenced by PhysicalObject::registerPrimitives(), Elastoid::registerPrimitives(), and ComposedPhysicalObject::registerPrimitives(). |
|
Definition at line 236 of file Simulator.cpp. References draggedObject, draggingPoint, and objects. Referenced by onMouseLeftDown(). |
|
Needs to be called after all objects were registered by the simulator, if we use box sorting for broad phase contact detection. Definition at line 33 of file Simulator.h. |
|
Sorts the n=0,1 list of sorted objects, with insertion sort. Definition at line 173 of file Simulator.cpp. References PhysicalObject::boxMin, and sortedObjects. Referenced by detectContacts(). |
|
Definition at line 252 of file Simulator.cpp. References draggedObject. Referenced by onMouseLeftUp(). |
|
The global list of contacts. This is a list of objects, not a list of pointers. Definition at line 88 of file Simulator.h. Referenced by advanceTime(), deleteContacts(), detectContacts(), fillContactMatrix(), indexContacts(), and Simulator(). |
|
Definition at line 75 of file Simulator.h. Referenced by advanceTime(), computeContacts(), fillContactMatrix(), indexContacts(), and Simulator(). |
|
The object dragged by the mouse. Definition at line 53 of file Simulator.h. Referenced by applyMouseForce(), setMouseForce(), and unsetMouseForce(). |
|
Definition at line 54 of file Simulator.h. Referenced by setMouseForce(). |
|
Definition at line 92 of file Simulator.h. Referenced by advanceTime(), and getDt(). |
|
Definition at line 106 of file Simulator.h. Referenced by advanceTime(), and Simulator(). |
|
The list of top level objects in the environment (borders, ball, agents, etc.). This list owns the objects. The top level objects may contain member objects, that they own. Definition at line 80 of file Simulator.h. Referenced by advanceTime(), controll(), deleteContacts(), deleteObjects(), draw(), registerObject(), and setMouseForce(). |
|
The list of low level objects (primitives) in the environment. The list does not own the objects. Currently, not used. Definition at line 84 of file Simulator.h. Referenced by registerPrimitive(). |
|
Definition at line 96 of file Simulator.h. Referenced by advanceTime(), and Simulator(). |
|
Lists of objects used for contact detection. The 2 lists correspond to the x and respectively y coordinates used for sorting. Definition at line 110 of file Simulator.h. Referenced by detectContacts(), registerObject(), and sortObjects(). |
|
Definition at line 131 of file Simulator.h. Referenced by detectContacts(). |
|
Definition at line 131 of file Simulator.h. Referenced by detectContacts(). |
Thyrix homepage Users' guide
(C) Arxia 2004-2005