PhysicsManager

from panda3d.physics import PhysicsManager
class PhysicsManager

Bases:

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

Inheritance diagram of PhysicsManager

__init__()

Default Constructor. NOTE: EulerIntegrator is the standard default.

__init__(param0: PhysicsManager)
addAngularForce(f: AngularForce)

Adds a global angular force to the physics manager

addLinearForce(f: LinearForce)

Adds a global linear force to the physics manager

attachAngularIntegrator(i: AngularIntegrator)

Hooks an angular integrator into the manager

attachLinearIntegrator(i: LinearIntegrator)

Hooks a linear integrator into the manager

attachPhysical(p: Physical)

Registers a Physical class with the manager

attachPhysicalNode(p: PhysicalNode)

Registers a physicalnode with the manager

attachPhysicalnode(p: PhysicalNode)

Please call attachPhysicalNode() instead.

clearAngularForces()

Resets the physics manager force vector

clearLinearForces()

Resets the physics manager force vector

clearPhysicals()

Resets the physics manager objects vector

debugOutput(out: panda3d.core.ostream, indent: int)

Write a string representation of this instance to <out>.

doPhysics(dt: float)

This is the main high-level API call. Performs integration on every attached Physical.

doPhysics(dt: float, p: Physical)

This is the main high-level API call. Performs integration on a single physical. Make sure its associated forces are active.

getViscosity() float

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(out: panda3d.core.ostream)

Write a string representation of this instance to <out>.

removeAngularForce(f: AngularForce)

takes an angular force out of the physics list

removeLinearForce(f: LinearForce)

takes a linear force out of the physics list

removePhysical(p: Physical)

takes a physical out of the object list

removePhysicalNode(p: PhysicalNode)

Removes a physicalnode from the manager

setViscosity(viscosity: float)

Set the global viscosity.

write(out: panda3d.core.ostream, indent: int)

Write a string representation of this instance to <out>.

writeAngularForces(out: panda3d.core.ostream, indent: int)

Write a string representation of this instance to <out>.

writeLinearForces(out: panda3d.core.ostream, indent: int)

Write a string representation of this instance to <out>.

writePhysicals(out: panda3d.core.ostream, indent: int)

Write a string representation of this instance to <out>.