- 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 PxDistanceJointarrayGet(long baseAddress, int index) voiddestroy()floatGet the damping of the joint spring.floatReturn the current distance of the jointGet the flags specific to the Distance Joint.floatGet the allowed maximum distance for the joint.floatGet the allowed minimum distance for the joint.floatGet the strength of the joint spring.floatGet the error tolerance of the joint.voidsetDamping(float damping) Set the damping of the joint spring.voidsetDistanceJointFlag(PxDistanceJointFlagEnum flag, boolean value) Set a single flag specific to a Distance Joint to true or false.voidSet the flags specific to the Distance Joint.voidsetMaxDistance(float distance) Set the allowed maximum distance for the joint.voidsetMinDistance(float distance) Set the allowed minimum distance for the joint.voidsetStiffness(float stiffness) Set the strength of the joint spring.voidsetTolerance(float tolerance) Set the error tolerance of the joint.static PxDistanceJointwrapPointer(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
-
PxDistanceJoint
protected PxDistanceJoint() -
PxDistanceJoint
protected PxDistanceJoint(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getDistance
public float getDistance()Return the current distance of the joint -
setMinDistance
public void setMinDistance(float distance) Set the allowed minimum distance for the joint.The minimum distance must be no more than the maximum distance
Default 0.0f Range [0, PX_MAX_F32)
- Parameters:
distance- the minimum distance- See Also:
-
getMinDistance
public float getMinDistance()Get the allowed minimum distance for the joint.- Returns:
- the allowed minimum distance
- See Also:
-
setMaxDistance
public void setMaxDistance(float distance) Set the allowed maximum distance for the joint.The maximum distance must be no less than the minimum distance.
Default 0.0f Range [0, PX_MAX_F32)
- Parameters:
distance- the maximum distance- See Also:
-
getMaxDistance
public float getMaxDistance()Get the allowed maximum distance for the joint.- Returns:
- the allowed maximum distance
- See Also:
-
setTolerance
public void setTolerance(float tolerance) Set the error tolerance of the joint.- Parameters:
tolerance- the distance beyond the allowed range at which the joint becomes active- See Also:
-
getTolerance
public float getTolerance()Get the error tolerance of the joint.the distance beyond the joint's [min, max] range before the joint becomes active.
Default 0.25f * PxTolerancesScale::length Range (0, PX_MAX_F32)
This value should be used to ensure that if the minimum distance is zero and the spring function is in use, the rest length of the spring is non-zero.
- See Also:
-
setStiffness
public void setStiffness(float stiffness) Set the strength of the joint spring.The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
Default 0.0f Range [0, PX_MAX_F32)
- Parameters:
stiffness- the spring strength of the joint- See Also:
-
getStiffness
public float getStiffness()Get the strength of the joint spring.- Returns:
- stiffness the spring strength of the joint
- See Also:
-
setDamping
public void setDamping(float damping) Set the damping of the joint spring.The spring is used if enabled, and the distance exceeds the range [min-error, max+error].
Default 0.0f Range [0, PX_MAX_F32)
- Parameters:
damping- the degree of damping of the joint spring of the joint- See Also:
-
getDamping
public float getDamping()Get the damping of the joint spring.- Returns:
- the degree of damping of the joint spring of the joint
- See Also:
-
setDistanceJointFlags
Set the flags specific to the Distance Joint.Default PxDistanceJointFlag::eMAX_DISTANCE_ENABLED
- Parameters:
flags- The joint flags.
-
setDistanceJointFlag
Set a single flag specific to a Distance Joint to true or false.- Parameters:
flag- The flag to set or clear.value- the value to which to set the flag
-
getDistanceJointFlags
Get the flags specific to the Distance Joint.- Returns:
- the joint flags
-