java.lang.Object
physx.NativeObject
physx.common.PxBase
physx.extensions.PxJoint
physx.extensions.PxSphericalJoint
A joint which behaves in a similar way to a ball and socket.
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()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.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
-