java.lang.Object
physx.NativeObject
physx.extensions.Support
physx.extensions.BoxSupport
Pre-made support mapping for a box
-
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
ConstructorsModifierConstructorDescriptionprotectedprotectedBoxSupport(long address) BoxSupport(PxVec3 halfExtents) Constructs a BoxSupport for a box halfExtents with optional marginBoxSupport(PxVec3 halfExtents, float margin) Constructs a BoxSupport for a box halfExtents with optional margin -
Method Summary
Modifier and TypeMethodDescriptionstatic BoxSupportarrayGet(long baseAddress, int index) static BoxSupportstatic BoxSupportstatic <T> BoxSupportcreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents) static <T> BoxSupportcreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents, float margin) voiddestroy()floatReturn the user defined shape margin.voidsetHalfExtents(PxVec3 value) voidsetMargin(float value) static BoxSupportwrapPointer(long address) Methods inherited from class physx.extensions.Support
supportLocalMethods 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
-
BoxSupport
protected BoxSupport() -
BoxSupport
protected BoxSupport(long address) -
BoxSupport
Constructs a BoxSupport for a box halfExtents with optional margin -
BoxSupport
Constructs a BoxSupport for a box halfExtents with optional margin
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.halfExtents- WebIDL type:PxVec3[Const, Ref]- Returns:
- Stack allocated object of BoxSupport
-
createAt
public static <T> BoxSupport createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents) - 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.halfExtents- WebIDL type:PxVec3[Const, Ref]- Returns:
- Stack allocated object of BoxSupport
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.halfExtents- WebIDL type:PxVec3[Const, Ref]margin- WebIDL type: float- Returns:
- Stack allocated object of BoxSupport
-
createAt
public static <T> BoxSupport createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 halfExtents, float margin) - 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.halfExtents- WebIDL type:PxVec3[Const, Ref]margin- WebIDL type: float- Returns:
- Stack allocated object of BoxSupport
-
destroy
public void destroy() -
getHalfExtents
-
setHalfExtents
-
getMargin
public float getMargin()Description copied from class:SupportReturn the user defined shape margin. Margin should be greater than or equal to 0 -
setMargin
public void setMargin(float value)
-