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.
- add_angular_force(f: AngularForce)
Adds an angular force to the force list
- add_linear_force(f: LinearForce)
Adds a linear force to the force list
- add_physics_object(po: PhysicsObject)
Adds an object to the physics object vector
- clear_angular_forces()
Erases the angular force list
- clear_linear_forces()
Erases the linear force list
- clear_physics_objects()
Erases the object list
- get_angular_force(index: int) AngularForce
- static get_class_type() panda3d.core.TypeHandle
- get_linear_force(index: int) LinearForce
- get_objects() PhysicsObjectCollection
- get_phys_body() PhysicsObject
- get_physical_node() PhysicalNode
- get_physical_node_path() panda3d.core.NodePath
- get_physics_manager() PhysicsManager
helpers
- property objects PhysicsObjectCollection
- output(out: panda3d.core.ostream)
Write a string representation of this instance to <out>.
- remove_angular_force(f: AngularForce)
removes an angular force from the force list
- remove_linear_force(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>.
- write_angular_forces(out: panda3d.core.ostream, indent: int)
Write a string representation of this instance to <out>.
- write_linear_forces(out: panda3d.core.ostream, indent: int)
Write a string representation of this instance to <out>.
- write_physics_objects(out: panda3d.core.ostream, indent: int)
Write a string representation of this instance to <out>.