PhysicsObject
from panda3d.physics import PhysicsObject
- class PhysicsObject
Bases:
TypedReferenceCount
A body on which physics will be applied. If you’re looking to add physical motion to your class, do NOT derive from this. Derive from Physical instead.
Inheritance diagram
- __init__(*args, **kwargs)
- active
- addImpact()
C++ Interface: add_impact(const PhysicsObject self, const LPoint3f offset_from_center_of_mass, const LVector3f impulse)
- /**
Adds an impulse and/or torque (i.e. an instantanious change in velocity)
based on how well the offset and impulse align with the center of mass (aka
position). If you wanted to immitate this function you could work out the
impulse and torque and call add_impulse and add_torque respectively.
offset and force are in global (or parent) coordinates.
*/
- addImpulse()
C++ Interface: add_impulse(const PhysicsObject self, const LVector3f impulse)
- /**
Adds an impulse force (i.e. an instantanious change in velocity). This is
a quicker way to get the velocity, add a vector to it and set that value to
be the new velocity.
*/
- addLocalImpact()
C++ Interface: add_local_impact(const PhysicsObject self, const LPoint3f offset_from_center_of_mass, const LVector3f impulse)
- /**
Adds an impulse and/or torque (i.e. an instantanious change in velocity)
based on how well the offset and impulse align with the center of mass (aka
position). If you wanted to immitate this function you could work out the
impulse and torque and call add_impulse and add_torque respectively.
offset and force are in local coordinates.
*/
- addLocalImpulse()
C++ Interface: add_local_impulse(const PhysicsObject self, const LVector3f impulse)
- /**
Adds an impulse force (i.e. an instantanious change in velocity). This is
a quicker way to get the velocity, add a vector to it and set that value to
be the new velocity.
*/
- addLocalTorque()
C++ Interface: add_local_torque(const PhysicsObject self, const LRotationf torque)
// Local instantanious forces
- /**
Adds an torque force (i.e. an instantanious change in velocity). This is
a quicker way to get the angular velocity, add a vector to it and set that
value to be the new angular velocity.
*/
- addTorque()
C++ Interface: add_torque(const PhysicsObject self, const LRotationf torque)
// Global instantanious forces
- /**
Adds an torque force (i.e. an instantanious change in velocity). This is
a quicker way to get the angular velocity, add a vector to it and set that
value to be the new angular velocity.
*/
- add_impact()
C++ Interface: add_impact(const PhysicsObject self, const LPoint3f offset_from_center_of_mass, const LVector3f impulse)
- /**
Adds an impulse and/or torque (i.e. an instantanious change in velocity)
based on how well the offset and impulse align with the center of mass (aka
position). If you wanted to immitate this function you could work out the
impulse and torque and call add_impulse and add_torque respectively.
offset and force are in global (or parent) coordinates.
*/
- add_impulse()
C++ Interface: add_impulse(const PhysicsObject self, const LVector3f impulse)
- /**
Adds an impulse force (i.e. an instantanious change in velocity). This is
a quicker way to get the velocity, add a vector to it and set that value to
be the new velocity.
*/
- add_local_impact()
C++ Interface: add_local_impact(const PhysicsObject self, const LPoint3f offset_from_center_of_mass, const LVector3f impulse)
- /**
Adds an impulse and/or torque (i.e. an instantanious change in velocity)
based on how well the offset and impulse align with the center of mass (aka
position). If you wanted to immitate this function you could work out the
impulse and torque and call add_impulse and add_torque respectively.
offset and force are in local coordinates.
*/
- add_local_impulse()
C++ Interface: add_local_impulse(const PhysicsObject self, const LVector3f impulse)
- /**
Adds an impulse force (i.e. an instantanious change in velocity). This is
a quicker way to get the velocity, add a vector to it and set that value to
be the new velocity.
*/
- add_local_torque()
C++ Interface: add_local_torque(const PhysicsObject self, const LRotationf torque)
// Local instantanious forces
- /**
Adds an torque force (i.e. an instantanious change in velocity). This is
a quicker way to get the angular velocity, add a vector to it and set that
value to be the new angular velocity.
*/
- add_torque()
C++ Interface: add_torque(const PhysicsObject self, const LRotationf torque)
// Global instantanious forces
- /**
Adds an torque force (i.e. an instantanious change in velocity). This is
a quicker way to get the angular velocity, add a vector to it and set that
value to be the new angular velocity.
*/
- getClassType()
C++ Interface: get_class_type()
- getImplicitVelocity()
C++ Interface: get_implicit_velocity(PhysicsObject self)
- /**
Velocity Query over the last dt
*/
- getInertialTensor()
C++ Interface: get_inertial_tensor(PhysicsObject self)
- /**
returns a transform matrix that represents the object’s willingness to be
forced.
*/
- getLastPosition()
C++ Interface: get_last_position(PhysicsObject self)
- /**
Get the position of the physics object at the start of the most recent
do_physics.
*/
- getLcs()
C++ Interface: get_lcs(PhysicsObject self)
- /**
returns a transform matrix to this object’s local coordinate system.
*/
- getName()
C++ Interface: get_name(const PhysicsObject self)
- getOrientation()
C++ Interface: get_orientation(PhysicsObject self)
- /**
get current orientation.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_implicit_velocity()
C++ Interface: get_implicit_velocity(PhysicsObject self)
- /**
Velocity Query over the last dt
*/
- get_inertial_tensor()
C++ Interface: get_inertial_tensor(PhysicsObject self)
- /**
returns a transform matrix that represents the object’s willingness to be
forced.
*/
- get_last_position()
C++ Interface: get_last_position(PhysicsObject self)
- /**
Get the position of the physics object at the start of the most recent
do_physics.
*/
- get_lcs()
C++ Interface: get_lcs(PhysicsObject self)
- /**
returns a transform matrix to this object’s local coordinate system.
*/
- get_mass()
C++ Interface: get_mass(PhysicsObject self)
- /**
Get the mass in slugs (or kilograms).
*/
- get_name()
C++ Interface: get_name(const PhysicsObject self)
- get_orientation()
C++ Interface: get_orientation(PhysicsObject self)
- /**
get current orientation.
*/
- implicit_velocity
- last_position
- mass
- orientation
- oriented
- output()
C++ Interface: output(PhysicsObject self, ostream out)
- /**
Write a string representation of this instance to <out>.
*/
- position
- resetOrientation()
C++ Interface: reset_orientation(const PhysicsObject self, const LOrientationf orientation)
- /**
set the orientation while clearing the rotation velocity.
*/
- resetPosition()
C++ Interface: reset_position(const PhysicsObject self, const LPoint3f pos)
- /**
use this to place an object in a completely new position, that has nothing
to do with its last position.
*/
- reset_orientation()
C++ Interface: reset_orientation(const PhysicsObject self, const LOrientationf orientation)
- /**
set the orientation while clearing the rotation velocity.
*/
- reset_position()
C++ Interface: reset_position(const PhysicsObject self, const LPoint3f pos)
- /**
use this to place an object in a completely new position, that has nothing
to do with its last position.
*/
- rotation
- setActive()
C++ Interface: set_active(const PhysicsObject self, bool flag)
- /**
Process Flag assignment
*/
- setLastPosition()
C++ Interface: set_last_position(const PhysicsObject self, const LPoint3f pos)
- /**
Last position assignment
*/
- setMass()
C++ Interface: set_mass(const PhysicsObject self, float param0)
- /**
Set the mass in slugs (or kilograms).
*/
- setName()
C++ Interface: set_name(const PhysicsObject self, str name)
- setOrientation()
C++ Interface: set_orientation(const PhysicsObject self, const LOrientationf orientation)
- /**
*/
- setOriented()
C++ Interface: set_oriented(const PhysicsObject self, bool flag)
- /**
Set flag to determine whether this object should do any rotation or
orientation calculations. Optimization.
*/
- setPosition()
C++ Interface: set_position(const PhysicsObject self, const LPoint3f pos) set_position(const PhysicsObject self, float x, float y, float z)
// INLINE void set_center_of_mass(const LPoint3 &pos); use set_position.
// INLINE void set_center_of_mass(const LPoint3 &pos); use set_position.
- setRotation()
C++ Interface: set_rotation(const PhysicsObject self, const LRotationf rotation)
- /**
set rotation as a quaternion delta per second.
*/
- setTerminalVelocity()
C++ Interface: set_terminal_velocity(const PhysicsObject self, float tv)
- /**
tv assignment
*/
- setVelocity()
C++ Interface: set_velocity(const PhysicsObject self, const LVector3f vel) set_velocity(const PhysicsObject self, float x, float y, float z)
- set_active()
C++ Interface: set_active(const PhysicsObject self, bool flag)
- /**
Process Flag assignment
*/
- set_last_position()
C++ Interface: set_last_position(const PhysicsObject self, const LPoint3f pos)
- /**
Last position assignment
*/
- set_mass()
C++ Interface: set_mass(const PhysicsObject self, float param0)
- /**
Set the mass in slugs (or kilograms).
*/
- set_name()
C++ Interface: set_name(const PhysicsObject self, str name)
- set_orientation()
C++ Interface: set_orientation(const PhysicsObject self, const LOrientationf orientation)
- /**
*/
- set_oriented()
C++ Interface: set_oriented(const PhysicsObject self, bool flag)
- /**
Set flag to determine whether this object should do any rotation or
orientation calculations. Optimization.
*/
- set_position()
C++ Interface: set_position(const PhysicsObject self, const LPoint3f pos) set_position(const PhysicsObject self, float x, float y, float z)
// INLINE void set_center_of_mass(const LPoint3 &pos); use set_position.
// INLINE void set_center_of_mass(const LPoint3 &pos); use set_position.
- set_rotation()
C++ Interface: set_rotation(const PhysicsObject self, const LRotationf rotation)
- /**
set rotation as a quaternion delta per second.
*/
- set_terminal_velocity()
C++ Interface: set_terminal_velocity(const PhysicsObject self, float tv)
- /**
tv assignment
*/
- set_velocity()
C++ Interface: set_velocity(const PhysicsObject self, const LVector3f vel) set_velocity(const PhysicsObject self, float x, float y, float z)
- terminal_velocity
- velocity