22 void PhysxD6JointDesc::
23 set_x_motion(PhysxD6JointMotion xMotion) {
25 _desc.xMotion = (NxD6JointMotion)xMotion;
31 void PhysxD6JointDesc::
32 set_y_motion(PhysxD6JointMotion yMotion) {
34 _desc.yMotion = (NxD6JointMotion)yMotion;
40 void PhysxD6JointDesc::
41 set_z_motion(PhysxD6JointMotion zMotion) {
43 _desc.zMotion = (NxD6JointMotion)zMotion;
49 void PhysxD6JointDesc::
50 set_swing1_motion(PhysxD6JointMotion swing1Motion) {
52 _desc.swing1Motion = (NxD6JointMotion)swing1Motion;
58 void PhysxD6JointDesc::
59 set_swing2_motion(PhysxD6JointMotion swing2Motion) {
61 _desc.swing2Motion = (NxD6JointMotion)swing2Motion;
67 void PhysxD6JointDesc::
68 set_twist_motion(PhysxD6JointMotion twistMotion) {
70 _desc.twistMotion = (NxD6JointMotion)twistMotion;
76 void PhysxD6JointDesc::
79 _desc.xDrive = drive._desc;
85 void PhysxD6JointDesc::
88 _desc.yDrive = drive._desc;
94 void PhysxD6JointDesc::
97 _desc.zDrive = drive._desc;
103 void PhysxD6JointDesc::
106 _desc.swingDrive = drive._desc;
112 void PhysxD6JointDesc::
115 _desc.twistDrive = drive._desc;
121 void PhysxD6JointDesc::
124 _desc.slerpDrive = drive._desc;
131 set_flag(PhysxD6JointFlag flag,
bool value) {
137 _desc.flags &= ~(flag);
144 void PhysxD6JointDesc::
147 _desc.linearLimit = limit._desc;
153 void PhysxD6JointDesc::
156 _desc.swing1Limit = limit._desc;
162 void PhysxD6JointDesc::
165 _desc.swing2Limit = limit._desc;
171 void PhysxD6JointDesc::
174 _desc.twistLimit.low = limit._desc;
180 void PhysxD6JointDesc::
183 _desc.twistLimit.high = limit._desc;
189 void PhysxD6JointDesc::
190 set_projection_distance(
float distance) {
192 _desc.projectionDistance = distance;
198 void PhysxD6JointDesc::
199 set_projection_angle(
float angle) {
201 _desc.projectionAngle = angle;
207 void PhysxD6JointDesc::
208 set_gear_ratio(
float ratio) {
210 _desc.gearRatio = ratio;
216 void PhysxD6JointDesc::
217 set_drive_position(
const LPoint3f &pos) {
219 nassertv(!pos.is_nan());
226 void PhysxD6JointDesc::
227 set_drive_linear_velocity(
const LVector3f &v) {
229 nassertv(!v.is_nan());
236 void PhysxD6JointDesc::
237 set_drive_angular_velocity(
const LVector3f &v) {
239 nassertv(!v.is_nan());
246 void PhysxD6JointDesc::
247 set_drive_orientation(
const LQuaternionf &quat) {
258 _desc.projectionMode = (NxJointProjectionMode)mode;
264 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
265 get_x_motion()
const {
267 return (PhysxD6JointMotion)_desc.xMotion;
273 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
274 get_y_motion()
const {
276 return (PhysxD6JointMotion)_desc.yMotion;
282 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
283 get_z_motion()
const {
285 return (PhysxD6JointMotion)_desc.zMotion;
291 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
292 get_swing1_motion()
const {
294 return (PhysxD6JointMotion)_desc.swing1Motion;
300 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
301 get_swing2_motion()
const {
303 return (PhysxD6JointMotion)_desc.swing2Motion;
309 PhysxEnums::PhysxD6JointMotion PhysxD6JointDesc::
310 get_twist_motion()
const {
312 return (PhysxD6JointMotion)_desc.twistMotion;
319 get_x_drive()
const {
322 value._desc = _desc.xDrive;
330 get_y_drive()
const {
333 value._desc = _desc.yDrive;
341 get_z_drive()
const {
344 value._desc = _desc.zDrive;
352 get_swing_drive()
const {
355 value._desc = _desc.swingDrive;
363 get_twist_drive()
const {
366 value._desc = _desc.twistDrive;
374 get_slerp_drive()
const {
377 value._desc = _desc.slerpDrive;
384 bool PhysxD6JointDesc::
385 get_flag(PhysxD6JointFlag flag)
const {
387 return (_desc.flags & flag) ? true :
false;
394 get_linear_limit()
const {
397 value._desc = _desc.linearLimit;
405 get_swing1_limit()
const {
408 value._desc = _desc.swing1Limit;
416 get_swing2_limit()
const {
419 value._desc = _desc.swing2Limit;
427 get_twist_limit_low()
const {
430 value._desc = _desc.twistLimit.low;
438 get_twist_limit_high()
const {
441 value._desc = _desc.twistLimit.high;
448 float PhysxD6JointDesc::
449 get_projection_distance()
const {
451 return _desc.projectionDistance;
457 float PhysxD6JointDesc::
458 get_projection_angle()
const {
460 return _desc.projectionAngle;
466 float PhysxD6JointDesc::
467 get_gear_ratio()
const {
469 return _desc.gearRatio;
475 LPoint3f PhysxD6JointDesc::
476 get_drive_position()
const {
484 LVector3f PhysxD6JointDesc::
485 get_drive_linear_velocity()
const {
493 LVector3f PhysxD6JointDesc::
494 get_drive_angular_velocity()
const {
502 LQuaternionf PhysxD6JointDesc::
503 get_drive_orientation()
const {
511 PhysxEnums::PhysxProjectionMode PhysxD6JointDesc::
512 get_projection_mode()
const {
514 return (PhysxProjectionMode)_desc.projectionMode;
void set_projection_mode(PhysxProjectionMode mode)
Use this to enable joint projection.
void set_flag(PhysxD6JointFlag flag, bool value)
Sets or clears a single D6JointFlag flag.
Used to describe drive properties for a PhysxD6Joint.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
static NxQuat quat_to_nxQuat(const LQuaternionf &q)
Converts from LQuaternionf to NxQuat.
static LQuaternionf nxQuat_to_quat(const NxQuat &q)
Converts from NxQuat to LQuaternionf.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
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.