15 #ifndef __BULLET_RIGID_BODY_NODE_H__ 16 #define __BULLET_RIGID_BODY_NODE_H__ 18 #include "pandabase.h" 20 #include "bullet_includes.h" 21 #include "bullet_utils.h" 22 #include "bulletBodyNode.h" 24 #include "pandaNode.h" 25 #include "collideMask.h" 40 void set_mass(PN_stdfloat mass);
41 PN_stdfloat get_mass()
const;
42 PN_stdfloat get_inv_mass()
const;
43 void set_inertia(
const LVecBase3 &inertia);
45 LVector3 get_inv_inertia_diag_local()
const;
46 LMatrix3 get_inv_inertia_tensor_world()
const;
49 LVector3 get_linear_velocity()
const;
50 LVector3 get_angular_velocity()
const;
51 void set_linear_velocity(
const LVector3 &velocity);
52 void set_angular_velocity(
const LVector3 &velocity);
55 INLINE PN_stdfloat get_linear_damping()
const;
56 INLINE PN_stdfloat get_angular_damping()
const;
57 INLINE
void set_linear_damping(PN_stdfloat value);
58 INLINE
void set_angular_damping(PN_stdfloat value);
63 void apply_central_force(
const LVector3 &force);
65 void apply_central_impulse(
const LVector3 &impulse);
66 void apply_torque(
const LVector3 &torque);
67 void apply_torque_impulse(
const LVector3 &torque);
73 PN_stdfloat get_linear_sleep_threshold()
const;
74 PN_stdfloat get_angular_sleep_threshold()
const;
75 void set_linear_sleep_threshold(PN_stdfloat threshold);
76 void set_angular_sleep_threshold(PN_stdfloat threshold);
79 void set_gravity(
const LVector3 &gravity);
83 void set_linear_factor(
const LVector3 &factor);
84 void set_angular_factor(
const LVector3 &factor);
87 bool pick_dirty_flag();
90 virtual btCollisionObject *get_object()
const;
92 virtual void output(ostream &out)
const;
98 virtual void transform_changed();
101 virtual void shape_changed();
105 class MotionState :
public btMotionState {
110 virtual void getWorldTransform(btTransform &trans)
const;
111 virtual void setWorldTransform(
const btTransform &trans);
113 void set_net_transform(
const TransformState *ts);
116 bool sync_disabled()
const;
118 bool pick_dirty_flag();
127 MotionState *_motion;
135 static void init_type() {
136 BulletBodyNode::init_type();
137 register_type(_type_handle,
"BulletRigidBodyNode",
138 BulletBodyNode::get_class_type());
141 return get_class_type();
145 return get_class_type();
152 #include "bulletRigidBodyNode.I" 154 #endif // __BULLET_RIGID_BODY_NODE_H__ A basic node of the scene graph or data graph.
This is the base class for all three-component vectors and points.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
TypeHandle is the identifier used to differentiate C++ class types.
This is a 3-by-3 transform matrix.