15 #ifndef PHYSICS_OBJECT_H
16 #define PHYSICS_OBJECT_H
18 #include "pandabase.h"
19 #include "typedReferenceCount.h"
21 #include "configVariableDouble.h"
41 INLINE
void set_active(
bool flag);
42 INLINE
bool get_active()
const;
44 INLINE
void set_mass(PN_stdfloat);
45 INLINE PN_stdfloat get_mass()
const;
48 INLINE
void set_position(
const LPoint3 &pos);
49 INLINE
void set_position(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
50 INLINE
LPoint3 get_position()
const;
52 INLINE
void reset_position(
const LPoint3 &pos);
54 INLINE
void set_last_position(
const LPoint3 &pos);
55 INLINE
LPoint3 get_last_position()
const;
57 INLINE
void set_velocity(
const LVector3 &vel);
58 INLINE
void set_velocity(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
59 INLINE
LVector3 get_velocity()
const;
60 INLINE
LVector3 get_implicit_velocity()
const;
63 INLINE
void add_torque(
const LRotation &torque);
64 INLINE
void add_impulse(
const LVector3 &impulse);
65 virtual void add_impact(
69 INLINE
void add_local_torque(
const LRotation &torque);
70 INLINE
void add_local_impulse(
const LVector3 &impulse);
71 virtual void add_local_impact(
74 INLINE
void set_terminal_velocity(PN_stdfloat tv);
75 INLINE PN_stdfloat get_terminal_velocity()
const;
77 INLINE
void set_oriented(
bool flag);
78 INLINE
bool get_oriented()
const;
80 INLINE
void set_orientation(
const LOrientation &orientation);
83 INLINE
void reset_orientation(
const LOrientation &orientation);
85 INLINE
void set_rotation(
const LRotation &rotation);
88 virtual LMatrix4 get_inertial_tensor()
const;
93 void set_name(
const string &name) {
96 const string& get_name() {
101 virtual void output(ostream &out)
const;
102 virtual void write(ostream &out,
unsigned int indent=0)
const;
114 PN_stdfloat _terminal_velocity;
128 static void init_type() {
129 TypedReferenceCount::init_type();
130 register_type(_type_handle,
"PhysicsObject",
131 TypedReferenceCount::get_class_type());
134 return get_class_type();
136 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
142 #include "physicsObject.I"
144 #endif // __PHYSICS_OBJECT_H__
This is a unit quaternion representing a rotation.
A body on which physics will be applied.
This is a unit quaternion representing an orientation.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
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 ...
This is a convenience class to specialize ConfigVariable as a floating-point type.
This is a 4-by-4 transform matrix.
TypeHandle is the identifier used to differentiate C++ class types.