java.lang.Object
physx.NativeObject
physx.physics.PxSceneLimits
Class used to retrieve limits(e.g. maximum number of bodies) for a scene. The limits
are used as a hint to the size of the scene, not as a hard limit (i.e. it will be possible
to create more objects than specified in the scene limits).
0 indicates no limit. Using limits allows the SDK to preallocate various arrays, leading to less re-allocations and faster code at runtime.
-
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 PxSceneLimitsarrayGet(long baseAddress, int index) static PxSceneLimitscreateAt(long address) static <T> PxSceneLimitscreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()intExpected maximum number of actorsintExpected maximum number of aggregatesintExpected maximum number of dynamic rigid bodiesintExpected maximum number of broad-phase overlapsintExpected maximum number of constraint shadersintExpected maximum number of dynamic shapesintExpected maximum number of broad-phase regionsintExpected maximum number of static shapesbooleanisValid()Returns true if the descriptor is valid.voidsetMaxNbActors(int value) Expected maximum number of actorsvoidsetMaxNbAggregates(int value) Expected maximum number of aggregatesvoidsetMaxNbBodies(int value) Expected maximum number of dynamic rigid bodiesvoidsetMaxNbBroadPhaseOverlaps(int value) Expected maximum number of broad-phase overlapsvoidsetMaxNbConstraints(int value) Expected maximum number of constraint shadersvoidsetMaxNbDynamicShapes(int value) Expected maximum number of dynamic shapesvoidsetMaxNbRegions(int value) Expected maximum number of broad-phase regionsvoidsetMaxNbStaticShapes(int value) Expected maximum number of static shapesvoid(re)sets the structure to the defaultstatic PxSceneLimitswrapPointer(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
-
PxSceneLimits
protected PxSceneLimits(long address) -
PxSceneLimits
public PxSceneLimits()constructor sets to default
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxSceneLimits
-
createAt
- 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.- Returns:
- Stack allocated object of PxSceneLimits
-
destroy
public void destroy() -
getMaxNbActors
public int getMaxNbActors()Expected maximum number of actors -
setMaxNbActors
public void setMaxNbActors(int value) Expected maximum number of actors -
getMaxNbBodies
public int getMaxNbBodies()Expected maximum number of dynamic rigid bodies -
setMaxNbBodies
public void setMaxNbBodies(int value) Expected maximum number of dynamic rigid bodies -
getMaxNbStaticShapes
public int getMaxNbStaticShapes()Expected maximum number of static shapes -
setMaxNbStaticShapes
public void setMaxNbStaticShapes(int value) Expected maximum number of static shapes -
getMaxNbDynamicShapes
public int getMaxNbDynamicShapes()Expected maximum number of dynamic shapes -
setMaxNbDynamicShapes
public void setMaxNbDynamicShapes(int value) Expected maximum number of dynamic shapes -
getMaxNbAggregates
public int getMaxNbAggregates()Expected maximum number of aggregates -
setMaxNbAggregates
public void setMaxNbAggregates(int value) Expected maximum number of aggregates -
getMaxNbConstraints
public int getMaxNbConstraints()Expected maximum number of constraint shaders -
setMaxNbConstraints
public void setMaxNbConstraints(int value) Expected maximum number of constraint shaders -
getMaxNbRegions
public int getMaxNbRegions()Expected maximum number of broad-phase regions -
setMaxNbRegions
public void setMaxNbRegions(int value) Expected maximum number of broad-phase regions -
getMaxNbBroadPhaseOverlaps
public int getMaxNbBroadPhaseOverlaps()Expected maximum number of broad-phase overlaps -
setMaxNbBroadPhaseOverlaps
public void setMaxNbBroadPhaseOverlaps(int value) Expected maximum number of broad-phase overlaps -
setToDefault
public void setToDefault()(re)sets the structure to the default -
isValid
public boolean isValid()Returns true if the descriptor is valid.- Returns:
- true if the current settings are valid.
-