Package physx.physics

Class PxSceneLimits

java.lang.Object
physx.NativeObject
physx.physics.PxSceneLimits

public class PxSceneLimits extends NativeObject
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.

  • 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

      public static PxSceneLimits wrapPointer(long address)
    • arrayGet

      public static PxSceneLimits arrayGet(long baseAddress, int index)
    • createAt

      public static PxSceneLimits createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxSceneLimits
    • createAt

      public static <T> PxSceneLimits createAt(T allocator, NativeObject.Allocator<T> allocate)
      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.