java.lang.Object
physx.NativeObject
physx.extensions.PxSpring
- Direct Known Subclasses:
PxD6JointDrive
-
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 PxSpringarrayGet(long baseAddress, int index) static PxSpringcreateAt(long address, float stiffness, float damping) static <T> PxSpringcreateAt(T allocator, NativeObject.Allocator<T> allocate, float stiffness, float damping) voiddestroy()floatthe damping strength of the drive: that is, the force proportional to the velocity errorfloatthe spring strength of the drive: that is, the force proportional to the position errorvoidsetDamping(float value) the damping strength of the drive: that is, the force proportional to the velocity errorvoidsetStiffness(float value) the spring strength of the drive: that is, the force proportional to the position errorstatic PxSpringwrapPointer(long address) Methods 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
-
PxSpring
protected PxSpring() -
PxSpring
protected PxSpring(long address) -
PxSpring
public PxSpring(float stiffness, float damping) - Parameters:
stiffness- WebIDL type: floatdamping- WebIDL type: float
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.stiffness- WebIDL type: floatdamping- WebIDL type: float- Returns:
- Stack allocated object of PxSpring
-
createAt
public static <T> PxSpring createAt(T allocator, NativeObject.Allocator<T> allocate, float stiffness, float damping) - 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.stiffness- WebIDL type: floatdamping- WebIDL type: float- Returns:
- Stack allocated object of PxSpring
-
destroy
public void destroy() -
getStiffness
public float getStiffness()the spring strength of the drive: that is, the force proportional to the position error -
setStiffness
public void setStiffness(float value) the spring strength of the drive: that is, the force proportional to the position error -
getDamping
public float getDamping()the damping strength of the drive: that is, the force proportional to the velocity error -
setDamping
public void setDamping(float value) the damping strength of the drive: that is, the force proportional to the velocity error
-