Panda3D
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions
BulletRigidBodyNode Class Reference
Inheritance diagram for BulletRigidBodyNode:
BulletBodyNode PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject MemoryBase MemoryBase MemoryBase

List of all members.

Classes

class  MotionState

Public Member Functions

 BulletRigidBodyNode (const char *name="rigid")
void apply_central_force (const LVector3 &force)
void apply_central_impulse (const LVector3 &impulse)
void apply_force (const LVector3 &force, const LPoint3 &pos)
void apply_impulse (const LVector3 &impulse, const LPoint3 &pos)
void apply_torque (const LVector3 &torque)
void apply_torque_impulse (const LVector3 &torque)
void clear_forces ()
virtual TypeHandle force_init_type ()
PN_stdfloat get_angular_damping () const
PN_stdfloat get_angular_sleep_threshold () const
LVector3 get_angular_velocity () const
LVector3 get_gravity () const
LVector3 get_inertia () const
 Returns the inertia of the rigid body.
PN_stdfloat get_linear_damping () const
PN_stdfloat get_linear_sleep_threshold () const
LVector3 get_linear_velocity () const
PN_stdfloat get_mass () const
 Returns the total mass of a rigid body.
virtual btCollisionObject * get_object () const
virtual TypeHandle get_type () const
virtual void output (ostream &out) const
 Outputs the Namable.
void set_angular_damping (PN_stdfloat value)
void set_angular_factor (const LVector3 &factor)
void set_angular_sleep_threshold (PN_stdfloat threshold)
void set_angular_velocity (const LVector3 &velocity)
void set_gravity (const LVector3 &gravity)
void set_inertia (const LVecBase3 &inertia)
 Sets the inertia of a rigid body.
void set_linear_damping (PN_stdfloat value)
void set_linear_factor (const LVector3 &factor)
void set_linear_sleep_threshold (PN_stdfloat threshold)
void set_linear_velocity (const LVector3 &velocity)
void set_mass (PN_stdfloat mass)
 Sets the mass of a rigid body.
void sync_b2p ()
void sync_p2b ()

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual void transform_changed ()
 Called after the node's transform has been changed for any reason, this just provides a hook so derived classes can do something special in this case.

Detailed Description

Definition at line 33 of file bulletRigidBodyNode.h.


Member Function Documentation

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.

Definition at line 169 of file bulletRigidBodyNode.cxx.

PN_stdfloat BulletRigidBodyNode::get_mass ( ) 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.

Definition at line 123 of file bulletRigidBodyNode.cxx.

Referenced by output().

void BulletRigidBodyNode::output ( ostream &  out) const [virtual]

Outputs the Namable.

This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

Reimplemented from BulletBodyNode.

Definition at line 60 of file bulletRigidBodyNode.cxx.

References get_mass().

void BulletRigidBodyNode::set_inertia ( const LVecBase3 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.

Definition at line 148 of file bulletRigidBodyNode.cxx.

void BulletRigidBodyNode::set_mass ( PN_stdfloat  mass)

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.

Definition at line 102 of file bulletRigidBodyNode.cxx.

void BulletRigidBodyNode::transform_changed ( ) [protected, virtual]

Called after the node's transform has been changed for any reason, this just provides a hook so derived classes can do something special in this case.

Reimplemented from PandaNode.

Definition at line 269 of file bulletRigidBodyNode.cxx.

References LVecBase3f::almost_equal(), LMatrix4f::almost_equal(), and NodePath::any_path().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations