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