Panda3D
|
Physics don't get much higher-level than this. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
Default Constructor. | |
__init__ (const PhysicsManager) | |
addAngularForce (AngularForce f) | |
Adds a global angular force to the physics manager. | |
addLinearForce (LinearForce f) | |
Adds a global linear force to the physics manager. | |
attachAngularIntegrator (AngularIntegrator i) | |
Hooks an angular integrator into the manager. | |
attachLinearIntegrator (LinearIntegrator i) | |
Hooks a linear integrator into the manager. | |
attachPhysical (Physical p) | |
Registers a Physical class with the manager. | |
attachPhysicalnode (PhysicalNode p) | |
Please call attach_physical_node instead. | |
attachPhysicalNode (PhysicalNode p) | |
Registers a physicalnode with the manager. | |
clearAngularForces () | |
Resets the physics manager force vector. | |
clearLinearForces () | |
Resets the physics manager force vector. | |
clearPhysicals () | |
Resets the physics manager objects vector. | |
debugOutput (Ostream out, int indent) | |
Write a string representation of this instance to <out>. | |
doPhysics (float dt) | |
This is the main high-level API call. | |
doPhysics (float dt, Physical p) | |
This is the main high-level API call. | |
float | getViscosity () |
Get the global viscosity. | |
initRandomSeed () | |
One-time config function, sets up the random seed used by the physics and particle systems. | |
output (Ostream out) | |
Write a string representation of this instance to <out>. | |
removeAngularForce (AngularForce f) | |
takes an angular force out of the physics list | |
removeLinearForce (LinearForce f) | |
takes a linear force out of the physics list | |
removePhysical (Physical p) | |
takes a physical out of the object list | |
removePhysicalNode (PhysicalNode p) | |
Removes a physicalnode from the manager. | |
setViscosity (float viscosity) | |
Set the global viscosity. | |
write (Ostream out, int indent) | |
Write a string representation of this instance to <out>. | |
writeAngularForces (Ostream out, int indent) | |
Write a string representation of this instance to <out>. | |
writeLinearForces (Ostream out, int indent) | |
Write a string representation of this instance to <out>. | |
writePhysicals (Ostream out, int indent) | |
Write a string representation of this instance to <out>. | |
Physics don't get much higher-level than this.
Attach as many Physicals (particle systems, etc..) as you want, pick an integrator and go.
__init__ | ( | ) |
Default Constructor.
NOTE: EulerIntegrator is the standard default.
__init__ | ( | const PhysicsManager | ) |
addAngularForce | ( | AngularForce | f | ) |
Adds a global angular force to the physics manager.
addLinearForce | ( | LinearForce | f | ) |
Adds a global linear force to the physics manager.
attachAngularIntegrator | ( | AngularIntegrator | i | ) |
Hooks an angular integrator into the manager.
attachLinearIntegrator | ( | LinearIntegrator | i | ) |
Hooks a linear integrator into the manager.
attachPhysicalnode | ( | PhysicalNode | p | ) |
Please call attach_physical_node instead.
attachPhysicalNode | ( | PhysicalNode | p | ) |
Registers a physicalnode with the manager.
clearAngularForces | ( | ) |
Resets the physics manager force vector.
clearLinearForces | ( | ) |
Resets the physics manager force vector.
clearPhysicals | ( | ) |
Resets the physics manager objects vector.
debugOutput | ( | Ostream | out, |
int | indent ) |
Write a string representation of this instance to <out>.
doPhysics | ( | float | dt | ) |
This is the main high-level API call.
Performs integration on every attached Physical.
doPhysics | ( | float | dt, |
Physical | p ) |
This is the main high-level API call.
Performs integration on a single physical. Make sure its associated forces are active.
float getViscosity | ( | ) |
Get the global viscosity.
initRandomSeed | ( | ) |
One-time config function, sets up the random seed used by the physics and particle systems.
For synchronizing across distributed computers
output | ( | Ostream | out | ) |
Write a string representation of this instance to <out>.
removeAngularForce | ( | AngularForce | f | ) |
takes an angular force out of the physics list
removeLinearForce | ( | LinearForce | f | ) |
takes a linear force out of the physics list
removePhysical | ( | Physical | p | ) |
takes a physical out of the object list
removePhysicalNode | ( | PhysicalNode | p | ) |
Removes a physicalnode from the manager.
setViscosity | ( | float | viscosity | ) |
Set the global viscosity.
write | ( | Ostream | out, |
int | indent ) |
Write a string representation of this instance to <out>.
writeAngularForces | ( | Ostream | out, |
int | indent ) |
Write a string representation of this instance to <out>.
writeLinearForces | ( | Ostream | out, |
int | indent ) |
Write a string representation of this instance to <out>.
writePhysicals | ( | Ostream | out, |
int | indent ) |
Write a string representation of this instance to <out>.