53 void set_name(
const char *name);
54 void set_global_pos(
const LPoint3f &pos);
55 void set_global_mat(
const LMatrix4f &mat);
56 void set_global_hpr(
float h,
float p,
float r);
57 void set_body_flag(PhysxBodyFlag flag,
bool value);
58 void set_actor_flag(PhysxActorFlag flag,
bool value);
59 void set_contact_report_flag(PhysxContactPairFlag flag,
bool value);
60 void set_contact_report_threshold(
float threshold);
61 void set_group(
unsigned int group);
62 void set_dominance_group(
unsigned int group);
63 void set_shape_group(
unsigned int group );
65 const char *get_name()
const;
66 LPoint3f get_global_pos()
const;
67 LMatrix4f get_global_mat()
const;
68 LQuaternionf get_global_quat()
const;
69 bool get_body_flag(PhysxBodyFlag flag)
const;
70 bool get_actor_flag(PhysxActorFlag flag)
const;
71 unsigned int get_group()
const;
72 unsigned int get_dominance_group()
const;
74 bool is_dynamic()
const;
75 float compute_kinetic_energy()
const;
76 bool update_mass_from_shapes(
float density,
float totalMass);
81 void attach_node_path(
const NodePath &np);
82 void detach_node_path();
86 unsigned int get_num_shapes()
const;
89 PhysxShape *get_shape_by_name(
const char *name)
const;
90 MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
93 void add_force(
const LVector3f force,
94 PhysxForceMode mode=FM_force,
bool wakeup=
true);
95 void add_force_at_pos(
const LVector3f force,
const LPoint3f &pos,
96 PhysxForceMode mode=FM_force,
bool wakeup=
true);
97 void add_force_at_local_pos(
const LVector3f force,
const LPoint3f &pos,
98 PhysxForceMode mode=FM_force,
bool wakeup=
true);
99 void add_torque(
const LVector3f torque,
100 PhysxForceMode mode=FM_force,
bool wakeup=
true);
101 void add_local_force(
const LVector3f force,
102 PhysxForceMode mode=FM_force,
bool wakeup=
true);
103 void add_local_force_at_pos(
const LVector3f force,
const LPoint3f &pos,
104 PhysxForceMode mode=FM_force,
bool wakeup=
true);
105 void add_local_force_at_local_pos(
const LVector3f force,
const LPoint3f &pos,
106 PhysxForceMode mode=FM_force,
bool wakeup=
true);
107 void add_local_torque(
const LVector3f torque,
108 PhysxForceMode mode=FM_force,
bool wakeup=
true);
111 void set_mass(
float mass);
112 void set_c_mass_offset_local_mat(
const LMatrix4f &mat);
113 void set_c_mass_offset_local_pos(
const LPoint3f &pos);
114 void set_c_mass_offset_local_orientation(
const LMatrix3f &mat);
115 void set_c_mass_offset_global_mat(
const LMatrix4f &mat);
116 void set_c_mass_offset_global_pos(
const LPoint3f &pos);
117 void set_c_mass_offset_global_orientation(
const LMatrix3f &mat);
118 void set_c_mass_global_mat(
const LMatrix4f &mat);
119 void set_c_mass_global_pos(
const LPoint3f &pos);
120 void set_c_mass_global_orientation(
const LMatrix3f &mat);
121 void set_mass_space_inertia_tensor(
const LVector3f &m);
123 float get_mass()
const;
124 LMatrix4f get_c_mass_global_mat()
const;
125 LPoint3f get_c_mass_global_pos()
const;
126 LMatrix3f get_c_mass_global_orientation()
const;
127 LMatrix4f get_c_mass_local_mat()
const;
128 LPoint3f get_c_mass_local_pos()
const;
129 LMatrix3f get_c_mass_local_orientation()
const;
130 LVector3f get_mass_space_inertia_tensor()
const;
131 LMatrix3f get_global_inertia_tensor()
const;
132 LMatrix3f get_global_inertia_tensor_inverse()
const;
135 void set_linear_damping(
float linDamp);
136 void set_angular_damping(
float angDamp);
137 float get_linear_damping()
const;
138 float get_angular_damping()
const;
141 void set_linear_velocity(
const LVector3f &linVel);
142 void set_angular_velocity(
const LVector3f &angVel);
143 void set_max_angular_velocity(
float maxAngVel);
145 LVector3f get_linear_velocity()
const;
146 LVector3f get_angular_velocity()
const;
147 float get_max_angular_velocity()
const;
150 LVector3f get_point_velocity(
const LPoint3f &point)
const;
151 LVector3f get_local_point_velocity(
const LPoint3f &point)
const;
154 void set_linear_momentum(
const LVector3f &momentum);
155 void set_angular_momentum(
const LVector3f &momentum);
156 LVector3f get_linear_momentum()
const;
157 LVector3f get_angular_momentum()
const;
160 void set_sleep_linear_velocity(
float threshold);
161 void set_sleep_angular_velocity(
float threshold);
162 void set_sleep_energy_threshold(
float threshold);
163 float get_sleep_linear_velocity()
const;
164 float get_sleep_angular_velocity()
const;
165 float get_sleep_energy_threshold()
const;
166 bool is_sleeping()
const;
167 void wake_up(
float wakeCounterValue=NX_SLEEP_INTERVAL);
171 void move_global_pos(
const LPoint3f &pos);
172 void move_global_mat(
const LMatrix4f &mat);
173 void move_global_hpr(
float h,
float p,
float r);
175 INLINE
void ls()
const;
176 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
179 void update_transform(
const LMatrix4f &m);
185 INLINE NxActor *ptr()
const {
return _ptr; };
188 void link(NxActor *ptr);
203 static void init_type() {
204 PhysxObject::init_type();
206 PhysxObject::get_class_type());
209 return get_class_type();
213 return get_class_type();
Descriptor for the optional rigid body dynamic state of PhysxActor.