18 #include "pandabase.h" 22 #include "physxObject.h" 23 #include "physxObjectCollection.h" 24 #include "physxEnums.h" 25 #include "physx_includes.h" 57 void set_name(
const char *name);
58 void set_global_pos(
const LPoint3f &pos);
59 void set_global_mat(
const LMatrix4f &mat);
60 void set_global_hpr(
float h,
float p,
float r);
61 void set_body_flag(PhysxBodyFlag flag,
bool value);
62 void set_actor_flag(PhysxActorFlag flag,
bool value);
63 void set_contact_report_flag(PhysxContactPairFlag flag,
bool value);
64 void set_contact_report_threshold(
float threshold);
65 void set_group(
unsigned int group);
66 void set_dominance_group(
unsigned int group);
67 void set_shape_group(
unsigned int group );
69 const char *get_name()
const;
73 bool get_body_flag(PhysxBodyFlag flag)
const;
74 bool get_actor_flag(PhysxActorFlag flag)
const;
75 unsigned int get_group()
const;
76 unsigned int get_dominance_group()
const;
78 bool is_dynamic()
const;
79 float compute_kinetic_energy()
const;
80 bool update_mass_from_shapes(
float density,
float totalMass);
85 void attach_node_path(
const NodePath &np);
86 void detach_node_path();
90 unsigned int get_num_shapes()
const;
93 PhysxShape *get_shape_by_name(
const char *name)
const;
94 MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
98 PhysxForceMode mode=FM_force,
bool wakeup=
true);
100 PhysxForceMode mode=FM_force,
bool wakeup=
true);
102 PhysxForceMode mode=FM_force,
bool wakeup=
true);
104 PhysxForceMode mode=FM_force,
bool wakeup=
true);
105 void add_local_force(
const LVector3f force,
106 PhysxForceMode mode=FM_force,
bool wakeup=
true);
108 PhysxForceMode mode=FM_force,
bool wakeup=
true);
110 PhysxForceMode mode=FM_force,
bool wakeup=
true);
111 void add_local_torque(
const LVector3f torque,
112 PhysxForceMode mode=FM_force,
bool wakeup=
true);
115 void set_mass(
float mass);
116 void set_c_mass_offset_local_mat(
const LMatrix4f &mat);
117 void set_c_mass_offset_local_pos(
const LPoint3f &pos);
118 void set_c_mass_offset_local_orientation(
const LMatrix3f &mat);
119 void set_c_mass_offset_global_mat(
const LMatrix4f &mat);
120 void set_c_mass_offset_global_pos(
const LPoint3f &pos);
121 void set_c_mass_offset_global_orientation(
const LMatrix3f &mat);
122 void set_c_mass_global_mat(
const LMatrix4f &mat);
123 void set_c_mass_global_pos(
const LPoint3f &pos);
124 void set_c_mass_global_orientation(
const LMatrix3f &mat);
125 void set_mass_space_inertia_tensor(
const LVector3f &m);
127 float get_mass()
const;
129 LPoint3f get_c_mass_global_pos()
const;
130 LMatrix3f get_c_mass_global_orientation()
const;
132 LPoint3f get_c_mass_local_pos()
const;
133 LMatrix3f get_c_mass_local_orientation()
const;
134 LVector3f get_mass_space_inertia_tensor()
const;
135 LMatrix3f get_global_inertia_tensor()
const;
136 LMatrix3f get_global_inertia_tensor_inverse()
const;
139 void set_linear_damping(
float linDamp);
140 void set_angular_damping(
float angDamp);
141 float get_linear_damping()
const;
142 float get_angular_damping()
const;
145 void set_linear_velocity(
const LVector3f &linVel);
146 void set_angular_velocity(
const LVector3f &angVel);
147 void set_max_angular_velocity(
float maxAngVel);
151 float get_max_angular_velocity()
const;
158 void set_linear_momentum(
const LVector3f &momentum);
159 void set_angular_momentum(
const LVector3f &momentum);
164 void set_sleep_linear_velocity(
float threshold);
165 void set_sleep_angular_velocity(
float threshold);
166 void set_sleep_energy_threshold(
float threshold);
167 float get_sleep_linear_velocity()
const;
168 float get_sleep_angular_velocity()
const;
169 float get_sleep_energy_threshold()
const;
170 bool is_sleeping()
const;
171 void wake_up(
float wakeCounterValue=NX_SLEEP_INTERVAL);
175 void move_global_pos(
const LPoint3f &pos);
176 void move_global_mat(
const LMatrix4f &mat);
177 void move_global_hpr(
float h,
float p,
float r);
179 INLINE
void ls()
const;
180 INLINE
void ls(ostream &out,
int indent_level=0)
const;
183 void update_transform(
const LMatrix4f &m);
190 INLINE NxActor *ptr()
const {
return _ptr; };
193 void link(NxActor *ptr);
209 static void init_type() {
210 PhysxObject::init_type();
211 register_type(_type_handle,
"PhysxActor",
212 PhysxObject::get_class_type());
215 return get_class_type();
219 return get_class_type();
226 #include "physxActor.I" 228 #endif // PHYSXACTOR_H
Abstract base class for shapes.
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 ...
A scene is a collection of bodies, constraints, and effectors which can interact. ...
Abstract base class for character controllers.
This class exists just to provide scoping for the enums shared by PhysX classes.
This is a 4-by-4 transform matrix.
Descriptor for PhysxActor.
Actors are the main simulation objects.
Abstract base class for shape descriptors.
This is the base quaternion class.
Descriptor for the optional rigid body dynamic state of PhysxActor.
TypeHandle is the identifier used to differentiate C++ class types.
This is a 3-by-3 transform matrix.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...