14 #ifndef __BULLET_RIGID_BODY_NODE_H__
15 #define __BULLET_RIGID_BODY_NODE_H__
38 void set_mass(PN_stdfloat mass);
39 PN_stdfloat get_mass()
const;
40 PN_stdfloat get_inv_mass()
const;
41 void set_inertia(
const LVecBase3 &inertia);
42 LVector3 get_inertia()
const;
43 LVector3 get_inv_inertia_diag_local()
const;
44 LMatrix3 get_inv_inertia_tensor_world()
const;
47 LVector3 get_linear_velocity()
const;
48 LVector3 get_angular_velocity()
const;
49 void set_linear_velocity(
const LVector3 &velocity);
50 void set_angular_velocity(
const LVector3 &velocity);
53 PN_stdfloat get_linear_damping()
const;
54 PN_stdfloat get_angular_damping()
const;
55 void set_linear_damping(PN_stdfloat value);
56 void set_angular_damping(PN_stdfloat value);
60 void apply_force(
const LVector3 &force,
const LPoint3 &pos);
61 void apply_central_force(
const LVector3 &force);
62 void apply_impulse(
const LVector3 &impulse,
const LPoint3 &pos);
63 void apply_central_impulse(
const LVector3 &impulse);
64 void apply_torque(
const LVector3 &torque);
65 void apply_torque_impulse(
const LVector3 &torque);
67 LVector3 get_total_force()
const;
68 LVector3 get_total_torque()
const;
71 PN_stdfloat get_linear_sleep_threshold()
const;
72 PN_stdfloat get_angular_sleep_threshold()
const;
73 void set_linear_sleep_threshold(PN_stdfloat threshold);
74 void set_angular_sleep_threshold(PN_stdfloat threshold);
77 void set_gravity(
const LVector3 &gravity);
78 LVector3 get_gravity()
const;
81 LVector3 get_linear_factor()
const;
82 LVector3 get_angular_factor()
const;
83 void set_linear_factor(
const LVector3 &factor);
84 void set_angular_factor(
const LVector3 &factor);
87 bool pick_dirty_flag();
89 MAKE_PROPERTY(mass, get_mass, set_mass);
90 MAKE_PROPERTY(inv_mass, get_inv_mass);
91 MAKE_PROPERTY(inertia, get_inertia, set_inertia);
92 MAKE_PROPERTY(inv_inertia_diag_local, get_inv_inertia_diag_local);
93 MAKE_PROPERTY(inv_inertia_tensor_world, get_inv_inertia_tensor_world);
94 MAKE_PROPERTY(linear_velocity, get_linear_velocity, set_linear_velocity);
95 MAKE_PROPERTY(angular_velocity, get_angular_velocity, set_angular_velocity);
96 MAKE_PROPERTY(linear_damping, get_linear_damping, set_linear_damping);
97 MAKE_PROPERTY(angular_damping, get_angular_damping, set_angular_damping);
98 MAKE_PROPERTY(total_force, get_total_force);
99 MAKE_PROPERTY(total_torque, get_total_torque);
100 MAKE_PROPERTY(linear_sleep_threshold, get_linear_sleep_threshold, set_linear_sleep_threshold);
101 MAKE_PROPERTY(angular_sleep_threshold, get_angular_sleep_threshold, set_angular_sleep_threshold);
102 MAKE_PROPERTY(gravity, get_gravity, set_gravity);
103 MAKE_PROPERTY(linear_factor, get_linear_factor, set_linear_factor);
104 MAKE_PROPERTY(angular_factor, get_angular_factor, set_angular_factor);
107 virtual btCollisionObject *get_object()
const;
109 virtual void output(std::ostream &out)
const;
115 virtual void parents_changed();
116 virtual void transform_changed();
119 virtual void do_shape_changed();
120 void do_transform_changed();
122 void do_set_mass(PN_stdfloat mass);
123 PN_stdfloat do_get_mass()
const;
127 class MotionState :
public btMotionState {
132 virtual void getWorldTransform(btTransform &trans)
const;
133 virtual void setWorldTransform(
const btTransform &trans);
138 bool sync_disabled()
const;
140 bool pick_dirty_flag();
166 static void init_type() {
167 BulletBodyNode::init_type();
169 BulletBodyNode::get_class_type());
172 return get_class_type();
176 return get_class_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A basic node of the scene graph or data graph.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...