25 _desc.projectionDistance = distance;
32set_flag(PhysxSphericalJointFlag flag,
bool value) {
38 _desc.flags &= ~(flag);
48 _desc.twistSpring = spring._desc;
57 _desc.swingSpring = spring._desc;
66 _desc.jointSpring = spring._desc;
75 nassertv( !axis.is_nan() );
85 _desc.projectionMode = (NxJointProjectionMode)mode;
94 _desc.twistLimit.low = low._desc;
103 _desc.twistLimit.high = high._desc;
112 _desc.swingLimit = limit._desc;
118float PhysxSphericalJointDesc::
119get_projection_distance()
const {
121 return _desc.projectionDistance;
127bool PhysxSphericalJointDesc::
128get_flag(PhysxSphericalJointFlag flag)
const {
130 return (_desc.flags & flag) ? true :
false;
137get_twist_spring()
const {
140 value._desc = _desc.twistSpring;
148get_swing_spring()
const {
151 value._desc = _desc.swingSpring;
159get_joint_spring()
const {
162 value._desc = _desc.jointSpring;
169LVector3f PhysxSphericalJointDesc::
170get_swing_axis()
const {
178PhysxEnums::PhysxProjectionMode PhysxSphericalJointDesc::
179get_projection_mode()
const {
181 return (PhysxProjectionMode)_desc.projectionMode;
188get_twist_limit_low()
const {
191 value._desc = _desc.twistLimit.low;
199get_twist_limit_high()
const {
202 value._desc = _desc.twistLimit.high;
213 value._desc = _desc.swingLimit;
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
void set_twist_limit_low(const PhysxJointLimitDesc &low)
Limits rotation around twist axis.
void set_swing_limit(const PhysxJointLimitDesc &limit)
Limits swing of twist axis.
void set_projection_distance(float distance)
Set the distance above which to project joint.
void set_projection_mode(PhysxProjectionMode mode)
Use this to enable joint projection.
void set_joint_spring(const PhysxSpringDesc &spring)
Sets a spring that lets the joint get pulled apart.
void set_swing_spring(const PhysxSpringDesc &spring)
Sets a spring that works against swinging.
void set_twist_spring(const PhysxSpringDesc &spring)
Sets a spring that works against twisting.
void set_swing_axis(const LVector3f &axis)
Set the swing limit axis defined in the joint space of actor 0.
void set_twist_limit_high(const PhysxJointLimitDesc &high)
Limits rotation around twist axis.
void set_flag(PhysxSphericalJointFlag flag, bool value)
Sets or clears a single SphericalJointFlag flag.
PhysxJointLimitDesc get_swing_limit() const
Limits swing of twist axis.
Describes a joint spring.
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.