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