panda3d.bullet.BulletRigidBodyNode

from panda3d.bullet import BulletRigidBodyNode
class BulletRigidBodyNode

Bases: BulletBodyNode

Inheritance diagram

Inheritance diagram of BulletRigidBodyNode

__init__(name: str) → None
setMass(mass: float) → None

Sets the mass of a rigid body. This also modifies the inertia, which is automatically computed from the shape of the body. Setting a value of zero for mass will make the body static. A value of zero can be considered an infinite mass.

getMass() → float

Returns the total mass of a rigid body. A value of zero means that the body is staic, i.e. has an infinite mass.

getInvMass() → float

Returns the inverse mass of a rigid body.

setInertia(inertia: LVecBase3) → None

Sets the inertia of a rigid body. Inertia is given as a three-component vector. A component value of zero means infinite inertia along this direction. Setting the intertia will override the value which is automatically calculated from the rigid bodies shape. However, it is possible that automatic calculation of intertia is trigger after calling this method, and thus overwriting the explicitly set value again. This happens when: (a) the mass is set after the inertia. (b) a shape is added or removed from the body. (c) the scale of the body changed.

getInertia() → LVector3

Returns the inertia of the rigid body. Inertia is given as a three component vector. A component value of zero means infinite inertia along this direction.

Return type

LVector3

getInvInertiaDiagLocal() → LVector3
Return type

LVector3

getInvInertiaTensorWorld() → LMatrix3
Return type

LMatrix3

getLinearVelocity() → LVector3

Velocity

Return type

LVector3

getAngularVelocity() → LVector3
Return type

LVector3

setLinearVelocity(velocity: LVector3) → None
setAngularVelocity(velocity: LVector3) → None
getLinearDamping() → float

Damping

getAngularDamping() → float
setLinearDamping(value: float) → None
setAngularDamping(value: float) → None
clearForces() → None

Forces

applyForce(force: LVector3, pos: LPoint3) → None
applyCentralForce(force: LVector3) → None
applyImpulse(impulse: LVector3, pos: LPoint3) → None
applyCentralImpulse(impulse: LVector3) → None
applyTorque(torque: LVector3) → None
applyTorqueImpulse(torque: LVector3) → None
getTotalForce() → LVector3
Return type

LVector3

getTotalTorque() → LVector3
Return type

LVector3

getLinearSleepThreshold() → float

Deactivation thresholds

getAngularSleepThreshold() → float
setLinearSleepThreshold(threshold: float) → None
setAngularSleepThreshold(threshold: float) → None
setGravity(gravity: LVector3) → None

Gravity

getGravity() → LVector3
Return type

LVector3

getLinearFactor() → LVector3

Restrict movement

Return type

LVector3

getAngularFactor() → LVector3
Return type

LVector3

setLinearFactor(factor: LVector3) → None
setAngularFactor(factor: LVector3) → None
pickDirtyFlag() → bool

Returns TRUE if the transform of the rigid body has changed at least once since the last call to this method.

static getClassType() → TypeHandle
Return type

TypeHandle

property mass
Getter

Returns the total mass of a rigid body. A value of zero means that the body is staic, i.e. has an infinite mass.

Setter

Mass & inertia

Mass & inertia

Sets the mass of a rigid body. This also modifies the inertia, which is automatically computed from the shape of the body. Setting a value of zero for mass will make the body static. A value of zero can be considered an infinite mass.

Return type

float

property inv_mass

Returns the inverse mass of a rigid body.

Return type

float

property inertia
Getter

Returns the inertia of the rigid body. Inertia is given as a three component vector. A component value of zero means infinite inertia along this direction.

Setter

Sets the inertia of a rigid body. Inertia is given as a three-component vector. A component value of zero means infinite inertia along this direction. Setting the intertia will override the value which is automatically calculated from the rigid bodies shape. However, it is possible that automatic calculation of intertia is trigger after calling this method, and thus overwriting the explicitly set value again. This happens when: (a) the mass is set after the inertia. (b) a shape is added or removed from the body. (c) the scale of the body changed.

Return type

LVector3

property inv_inertia_diag_local
Return type

LVector3

property inv_inertia_tensor_world
Return type

LMatrix3

property linear_velocity

Velocity

Getter

Velocity

Velocity

Setter

Return type

LVector3

property angular_velocity

Getter Setter

Return type

LVector3

property linear_damping

Damping

Getter

Damping

Damping

Setter

Return type

float

property angular_damping

Getter Setter

Return type

float

property total_force
Return type

LVector3

property total_torque
Return type

LVector3

property linear_sleep_threshold

Deactivation thresholds

Getter

Deactivation thresholds

Deactivation thresholds

Setter

Return type

float

property angular_sleep_threshold

Getter Setter

Return type

float

property gravity

Getter Setter

Gravity

Gravity

Return type

LVector3

property linear_factor

Restrict movement

Getter

Restrict movement

Restrict movement

Setter

Return type

LVector3

property angular_factor

Getter Setter

Return type

LVector3