PhysicsManager
-
class PhysicsManager
Physics don’t get much higher-level than this. Attach as many Physicals (particle systems, etc..) as you want, pick an integrator and go.
Inheritance diagram
-
PhysicsManager(void)
-
PhysicsManager(PhysicsManager const&) = default
Default Constructor. NOTE: EulerIntegrator is the standard default.
-
void add_angular_force(AngularForce *f)
Adds a global angular force to the physics manager
-
void add_linear_force(LinearForce *f)
Adds a global linear force to the physics manager
-
void attach_angular_integrator(AngularIntegrator *i)
Hooks an angular integrator into the manager
-
void attach_linear_integrator(LinearIntegrator *i)
Hooks a linear integrator into the manager
-
void attach_physical_node(PhysicalNode *p)
use attach_physical_node instead.
Registers a physicalnode with the manager
-
void attach_physicalnode(PhysicalNode *p)
use
attach_physical_node
instead.Please call
attach_physical_node
instead.
-
void clear_angular_forces(void)
Resets the physics manager force vector
-
void clear_linear_forces(void)
Resets the physics manager force vector
-
void clear_physicals(void)
Resets the physics manager objects vector
-
virtual void debug_output(std::ostream &out, int indent = 0) const
Write a string representation of this instance to <out>.
-
void do_physics(PN_stdfloat dt)
-
void do_physics(PN_stdfloat dt, Physical *p)
This is the main high-level API call. Performs integration on every attached Physical.
This is the main high-level API call. Performs integration on a single physical. Make sure its associated forces are active.
-
PN_stdfloat get_viscosity(void) const
Get the global viscosity.
-
void init_random_seed(void)
One-time config function, sets up the random seed used by the physics and particle systems. For synchronizing across distributed computers
-
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
-
void remove_angular_force(AngularForce *f)
takes an angular force out of the physics list
-
void remove_linear_force(LinearForce *f)
takes a linear force out of the physics list
-
void remove_physical_node(PhysicalNode *p)
Removes a physicalnode from the manager
-
void set_viscosity(PN_stdfloat viscosity)
Set the global viscosity.
-
virtual void write(std::ostream &out, int indent = 0) const
Write a string representation of this instance to <out>.
-
virtual void write_angular_forces(std::ostream &out, int indent = 0) const
Write a string representation of this instance to <out>.
-
virtual void write_linear_forces(std::ostream &out, int indent = 0) const
Write a string representation of this instance to <out>.
-
virtual void write_physicals(std::ostream &out, int indent = 0) const
Write a string representation of this instance to <out>.
-
PhysicsManager(void)