#include <physicsManager.h>
Public Member Functions | |
PhysicsManager (void) | |
Default Constructor. | |
virtual | ~PhysicsManager (void) |
Simple Destructor. | |
void | attach_linear_integrator (LinearIntegrator *i) |
Hooks a linear integrator into the manager. | |
void | attach_angular_integrator (AngularIntegrator *i) |
Hooks an angular integrator into the manager. | |
void | attach_physical (Physical *p) |
Registers a Physical class with the manager. | |
void | attach_physicalnode (PhysicalNode *p) |
Registers an physicalnode with the manager. | |
void | add_linear_force (LinearForce *f) |
Adds a global linear force to the physics manager. | |
void | add_angular_force (AngularForce *f) |
Adds a global angular force to the physics manager. | |
void | clear_linear_forces (void) |
Resets the physics manager force vector. | |
void | clear_angular_forces (void) |
Resets the physics manager force vector. | |
void | clear_physicals (void) |
Resets the physics manager objects vector. | |
void | remove_physical (Physical *p) |
takes a physical out of the object list | |
void | remove_linear_force (LinearForce *f) |
takes a linear force out of the physics list | |
void | remove_angular_force (AngularForce *f) |
takes an angular force out of the physics list | |
void | do_physics (float dt) |
This is the main high-level API call. | |
Private Attributes | |
pvector< Physical * > | _physicals |
pvector< PointerTo< LinearForce > > | _linear_forces |
pvector< PointerTo< AngularForce > > | _angular_forces |
PointerTo< LinearIntegrator > | _linear_integrator |
PointerTo< AngularIntegrator > | _angular_integrator |
Friends | |
class | Physical |
Attach as many Physicals (particle systems, etc..) as you want, pick an integrator and go.
Definition at line 49 of file physicsManager.h.
|
Default Constructor. NOTE: EulerIntegrator is the standard default. Definition at line 39 of file physicsManager.cxx. |
|
Simple Destructor.
Definition at line 53 of file physicsManager.cxx. References _linear_forces. |
|
Adds a global angular force to the physics manager.
Definition at line 92 of file physicsManager.I. References _physicals, and INLINE. |
|
Adds a global linear force to the physics manager.
Definition at line 48 of file physicsManager.I. References attach_physical(), PhysicalNode::get_num_physicals(), PhysicalNode::get_physical(), and INLINE. |
|
Hooks an angular integrator into the manager.
Definition at line 148 of file physicsManager.I. |
|
Hooks a linear integrator into the manager.
Definition at line 135 of file physicsManager.I. |
|
Registers a Physical class with the manager.
Definition at line 31 of file physicsManager.I. Referenced by add_linear_force(). |
|
Registers an physicalnode with the manager.
Definition at line 65 of file physicsManager.I. References _linear_forces. |
|
Resets the physics manager force vector.
Definition at line 109 of file physicsManager.I. References _linear_integrator. |
|
Resets the physics manager force vector.
Definition at line 79 of file physicsManager.I. References _angular_forces. |
|
Resets the physics manager objects vector.
Definition at line 122 of file physicsManager.I. |
|
This is the main high-level API call. Performs integration on every attached Physical. Definition at line 129 of file physicsManager.cxx. |
|
takes an angular force out of the physics list
Definition at line 86 of file physicsManager.cxx. References _physicals, Physical::_physics_manager, and NULL. |
|
takes a linear force out of the physics list
Definition at line 65 of file physicsManager.cxx. References _angular_forces, and PT. |
|
takes a physical out of the object list
Definition at line 107 of file physicsManager.cxx. References _linear_integrator, and _physicals. |
|
Definition at line 85 of file physicsManager.h. |
|
Definition at line 60 of file physicsManager.h. Referenced by clear_linear_forces(), and remove_linear_force(). |
|
Definition at line 63 of file physicsManager.h. |
|
Definition at line 59 of file physicsManager.h. Referenced by attach_physicalnode(), and ~PhysicsManager(). |
|
Definition at line 62 of file physicsManager.h. Referenced by clear_angular_forces(), and remove_physical(). |
|
Definition at line 58 of file physicsManager.h. Referenced by add_angular_force(), remove_angular_force(), and remove_physical(). |