Class PxBoxGeometry


public class PxBoxGeometry extends PxGeometry
Class representing the geometry of a box.

The geometry of a box can be fully specified by its half extents. This is the half of its width, height, and depth. Note: The scaling of the box is expected to be baked into these values, there is no additional scaling parameter.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxBoxGeometry

      protected PxBoxGeometry()
    • PxBoxGeometry

      protected PxBoxGeometry(long address)
    • PxBoxGeometry

      public PxBoxGeometry(float hx, float hy, float hz)
      Constructor to initialize half extents from scalar parameters. \param hx Initial half extents' x component. \param hy Initial half extents' y component. \param hz Initial half extents' z component.
  • Method Details

    • wrapPointer

      public static PxBoxGeometry wrapPointer(long address)
    • arrayGet

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

      public static PxBoxGeometry createAt(long address, float hx, float hy, float hz)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      hx - WebIDL type: float
      hy - WebIDL type: float
      hz - WebIDL type: float
      Returns:
      Stack allocated object of PxBoxGeometry
    • createAt

      public static <T> PxBoxGeometry createAt(T allocator, NativeObject.Allocator<T> allocate, float hx, float hy, float hz)
      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.
      hx - WebIDL type: float
      hy - WebIDL type: float
      hz - WebIDL type: float
      Returns:
      Stack allocated object of PxBoxGeometry
    • destroy

      public void destroy()
      Overrides:
      destroy in class PxGeometry