BulletRigidBodyNode

class BulletRigidBodyNode

Bases: BulletBodyNode

Inheritance diagram

Inheritance diagram of BulletRigidBodyNode

explicit BulletRigidBodyNode(char const *name = "rigid")

Do not call the copy constructor directly; instead, use make_copy() or copy_subgraph() to make a copy of a node.

void apply_central_force(LVector3 const &force)
void apply_central_impulse(LVector3 const &impulse)
void apply_force(LVector3 const &force, LPoint3 const &pos)
void apply_impulse(LVector3 const &impulse, LPoint3 const &pos)
void apply_torque(LVector3 const &torque)
void apply_torque_impulse(LVector3 const &torque)
void clear_forces(void)

Forces

PN_stdfloat get_angular_damping(void) const
LVector3 get_angular_factor(void) const
PN_stdfloat get_angular_sleep_threshold(void) const
LVector3 get_angular_velocity(void) const
static TypeHandle get_class_type(void)
LVector3 get_gravity(void) const
LVector3 get_inertia(void) const

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.

LVector3 get_inv_inertia_diag_local(void) const
LMatrix3 get_inv_inertia_tensor_world(void) const
PN_stdfloat get_inv_mass(void) const

Returns the inverse mass of a rigid body.

PN_stdfloat get_linear_damping(void) const

Damping

Damping

LVector3 get_linear_factor(void) const

Restrict movement

Restrict movement

PN_stdfloat get_linear_sleep_threshold(void) const

Deactivation thresholds

Deactivation thresholds

LVector3 get_linear_velocity(void) const

Velocity

Velocity

PN_stdfloat get_mass(void) const

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

LVector3 get_total_force(void) const
LVector3 get_total_torque(void) const
bool pick_dirty_flag(void)

Special

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

void set_angular_damping(PN_stdfloat value)
void set_angular_factor(LVector3 const &factor)
void set_angular_sleep_threshold(PN_stdfloat threshold)
void set_angular_velocity(LVector3 const &velocity)
void set_gravity(LVector3 const &gravity)

Gravity

Gravity

void set_inertia(LVecBase3 const &inertia)

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.

void set_linear_damping(PN_stdfloat value)
void set_linear_factor(LVector3 const &factor)
void set_linear_sleep_threshold(PN_stdfloat threshold)
void set_linear_velocity(LVector3 const &velocity)
void set_mass(PN_stdfloat mass)

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.