java.lang.Object
physx.NativeObject
physx.extensions.PxJointLimitParameters
physx.extensions.PxJointLinearLimitPair
Describes a two-sided limit.
-
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
ConstructorsModifierConstructorDescriptionprotectedPxJointLinearLimitPair(float lowerLimit, float upperLimit, PxSpring spring) construct a linear soft limit pairprotectedPxJointLinearLimitPair(long address) -
Method Summary
Modifier and TypeMethodDescriptionstatic PxJointLinearLimitPairarrayGet(long baseAddress, int index) static PxJointLinearLimitPairstatic <T> PxJointLinearLimitPaircreateAt(T allocator, NativeObject.Allocator<T> allocate, float lowerLimit, float upperLimit, PxSpring spring) voiddestroy()floatgetLower()the range of the limit.floatgetUpper()voidsetLower(float value) the range of the limit.voidsetUpper(float value) static PxJointLinearLimitPairwrapPointer(long address) Methods inherited from class physx.extensions.PxJointLimitParameters
getBounceThreshold, getDamping, getRestitution, getStiffness, isSoft, isValid, setBounceThreshold, setDamping, setRestitution, setStiffnessMethods 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
-
PxJointLinearLimitPair
protected PxJointLinearLimitPair() -
PxJointLinearLimitPair
protected PxJointLinearLimitPair(long address) -
PxJointLinearLimitPair
construct a linear soft limit pair- Parameters:
lowerLimit- The lower distance of the limitupperLimit- The upper distance of the limitspring- The stiffness and damping parameters of the limit spring- See Also:
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
public static PxJointLinearLimitPair createAt(long address, float lowerLimit, float upperLimit, PxSpring spring) - Parameters:
address- Pre-allocated memory, where the object is created.lowerLimit- WebIDL type: floatupperLimit- WebIDL type: floatspring- WebIDL type:PxSpring[Const, Ref]- Returns:
- Stack allocated object of PxJointLinearLimitPair
-
createAt
public static <T> PxJointLinearLimitPair createAt(T allocator, NativeObject.Allocator<T> allocate, float lowerLimit, float upperLimit, PxSpring spring) - Type Parameters:
T- Allocator class, e.g. LWJGL's MemoryStack.- Parameters:
allocator- Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.allocate- Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.lowerLimit- WebIDL type: floatupperLimit- WebIDL type: floatspring- WebIDL type:PxSpring[Const, Ref]- Returns:
- Stack allocated object of PxJointLinearLimitPair
-
destroy
public void destroy() -
getUpper
public float getUpper()- Returns:
- WebIDL type: float
-
setUpper
public void setUpper(float value) - Parameters:
value- WebIDL type: float
-
getLower
public float getLower()the range of the limit. The upper limit must be no lower than the lower limit, and if they are equal the limited degree of freedom will be treated as locked.Range: See the joint on which the limit is used for details
Default: lower = -PX_MAX_F32/3, upper = PX_MAX_F32/3 -
setLower
public void setLower(float value) the range of the limit. The upper limit must be no lower than the lower limit, and if they are equal the limited degree of freedom will be treated as locked.Range: See the joint on which the limit is used for details
Default: lower = -PX_MAX_F32/3, upper = PX_MAX_F32/3
-