Physical
from panda3d.physics import Physical
- class Physical
Bases:
Bases:
TypedReferenceCount
Defines a set of physically modeled attributes. If you want physics applied to your class, derive it from this.
Inheritance diagram
- __init__(copy: Physical)
copy constructor (note- does deep copy of pn’s) but does NOT attach itself to its template’s physicsmanager.
- __init__(total_objects: int, pre_alloc: bool)
Default Constructor The idea here is that most physicals will NOT be collections of sets (i.e. particle systems and whatever else). Because of this, the default constructor, unless otherwise specified, will automatically allocate and initialize one PhysicalObject. This makes it easier for high-level work.
pre-alloc is ONLY for multiple-object physicals, and if true, fills the physics_object vector with dead nodes, pre-allocating for the speed end of the speed-vs-overhead deal.
- addAngularForce(f: AngularForce)
Adds an angular force to the force list
- addLinearForce(f: LinearForce)
Adds a linear force to the force list
- addPhysicsObject(po: PhysicsObject)
Adds an object to the physics object vector
- clearAngularForces()
Erases the angular force list
- clearLinearForces()
Erases the linear force list
- clearPhysicsObjects()
Erases the object list
- getAngularForce(index: int) AngularForce
- static getClassType() panda3d.core.TypeHandle
- getLinearForce(index: int) LinearForce
- getObjects() PhysicsObjectCollection
- getPhysBody() PhysicsObject
- getPhysicalNode() PhysicalNode
- getPhysicalNodePath() panda3d.core.NodePath
- getPhysicsManager() PhysicsManager
helpers
- property objects PhysicsObjectCollection
- output(out: panda3d.core.ostream)
Write a string representation of this instance to <out>.
- removeAngularForce(f: AngularForce)
removes an angular force from the force list
- removeLinearForce(f: LinearForce)
removes a linear force from the force list
- 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>.
- writePhysicsObjects(out: panda3d.core.ostream, indent: int)
Write a string representation of this instance to <out>.