A spherical joint removes all linear degrees of freedom from two objects.
The position of the joint on each actor is specified by the origin of the body's joint frame.
A spherical joint may have a cone limit, to restrict the motion to within a certain range. In addition, the bodies may be projected together if the distance between them exceeds a given threshold.
Projection, drive and limits are activated by setting the appropriate flags on the joint.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxSphericalJointarrayGet(long baseAddress, int index) voiddestroy()floatDeprecated.Get the flags specific to the Spherical Joint.floatget the swing angle of the joint from the Y axisfloatget the swing angle of the joint from the Z axisvoidsetLimitCone(PxJointLimitCone limitCone) Get the limit cone.voidsetProjectionLinearTolerance(float tolerance) Deprecated.voidsetSphericalJointFlag(PxSphericalJointFlagEnum flag, boolean value) Set a single flag specific to a Spherical Joint to true or false.voidSet the flags specific to the Spherical Joint.static PxSphericalJointwrapPointer(long address) Methods inherited from class physx.extensions.PxJoint
getConstraint, getConstraintFlags, getInvMassScale0, getInvMassScale1, getLocalPose, getName, getRelativeAngularVelocity, getRelativeLinearVelocity, getRelativeTransform, getScene, getUserData, setActors, setBreakForce, setConstraintFlag, setConstraintFlags, setInvMassScale0, setInvMassScale1, setLocalPose, setName, setUserDataMethods inherited from class physx.common.PxBase
getBaseFlags, getConcreteType, getConcreteTypeName, isReleasable, release, setBaseFlag, setBaseFlagsMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxSphericalJoint
protected PxSphericalJoint() -
PxSphericalJoint
protected PxSphericalJoint(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
setLimitCone
Get the limit cone.- See Also:
-
getSwingYAngle
public float getSwingYAngle()get the swing angle of the joint from the Y axis -
getSwingZAngle
public float getSwingZAngle()get the swing angle of the joint from the Z axis -
setSphericalJointFlags
Set the flags specific to the Spherical Joint.Default PxSphericalJointFlags(0)
- Parameters:
flags- The joint flags.
-
setSphericalJointFlag
Set a single flag specific to a Spherical Joint to true or false.- Parameters:
flag- The flag to set or clear.value- the value to which to set the flag
-
getSphericalJointFlags
Get the flags specific to the Spherical Joint.- Returns:
- the joint flags
-
setProjectionLinearTolerance
Deprecated.Set the linear tolerance threshold for projection. Projection is enabled if PxConstraintFlag::ePROJECTION is set for the joint.If the joint separates by more than this distance along its locked degrees of freedom, the solver will move the bodies to close the distance.
Setting a very small tolerance may result in simulation jitter or other artifacts.
Sometimes it is not possible to project (for example when the joints form a cycle).
Range: [0, PX_MAX_F32)
Default: 1e10f- Parameters:
tolerance- the linear tolerance threshold- See Also:
-
getProjectionLinearTolerance
Deprecated.Get the linear tolerance threshold for projection.- Returns:
- the linear tolerance threshold
- See Also:
-