Class MeshoptBounds

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class MeshoptBounds extends Struct<MeshoptBounds> implements NativeResource

 struct meshopt_Bounds {
     float center[3];
     float radius;
     float cone_apex[3];
     float cone_axis[3];
     float cone_cutoff;
     char cone_axis_s8[3];
     char cone_cutoff_s8;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • CENTER

      public static final int CENTER
      The struct member offsets.
    • RADIUS

      public static final int RADIUS
      The struct member offsets.
    • CONE_APEX

      public static final int CONE_APEX
      The struct member offsets.
    • CONE_AXIS

      public static final int CONE_AXIS
      The struct member offsets.
    • CONE_CUTOFF

      public static final int CONE_CUTOFF
      The struct member offsets.
    • CONE_AXIS_S8

      public static final int CONE_AXIS_S8
      The struct member offsets.
    • CONE_CUTOFF_S8

      public static final int CONE_CUTOFF_S8
      The struct member offsets.
  • Constructor Details

    • MeshoptBounds

      public MeshoptBounds(ByteBuffer container)
      Creates a MeshoptBounds instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<MeshoptBounds>
    • center

      public FloatBuffer center()
      Returns:
      a FloatBuffer view of the center field.
    • center

      public float center(int index)
      Returns:
      the value at the specified index of the center field.
    • radius

      public float radius()
      Returns:
      the value of the radius field.
    • cone_apex

      public FloatBuffer cone_apex()
      Returns:
      a FloatBuffer view of the cone_apex field.
    • cone_apex

      public float cone_apex(int index)
      Returns:
      the value at the specified index of the cone_apex field.
    • cone_axis

      public FloatBuffer cone_axis()
      Returns:
      a FloatBuffer view of the cone_axis field.
    • cone_axis

      public float cone_axis(int index)
      Returns:
      the value at the specified index of the cone_axis field.
    • cone_cutoff

      public float cone_cutoff()
      Returns:
      the value of the cone_cutoff field.
    • cone_axis_s8

      public ByteBuffer cone_axis_s8()
      Returns:
      a ByteBuffer view of the cone_axis_s8 field.
    • cone_axis_s8

      public byte cone_axis_s8(int index)
      Returns:
      the value at the specified index of the cone_axis_s8 field.
    • cone_cutoff_s8

      public byte cone_cutoff_s8()
      Returns:
      the value of the cone_cutoff_s8 field.
    • malloc

      public static MeshoptBounds malloc()
      Returns a new MeshoptBounds instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static MeshoptBounds calloc()
      Returns a new MeshoptBounds instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static MeshoptBounds create()
      Returns a new MeshoptBounds instance allocated with BufferUtils.
    • create

      public static MeshoptBounds create(long address)
      Returns a new MeshoptBounds instance for the specified memory address.
    • createSafe

      public static @Nullable MeshoptBounds createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static MeshoptBounds.Buffer malloc(int capacity)
      Returns a new MeshoptBounds.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static MeshoptBounds.Buffer calloc(int capacity)
      Returns a new MeshoptBounds.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static MeshoptBounds.Buffer create(int capacity)
      Returns a new MeshoptBounds.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static MeshoptBounds.Buffer create(long address, int capacity)
      Create a MeshoptBounds.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable MeshoptBounds.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static MeshoptBounds malloc(MemoryStack stack)
      Returns a new MeshoptBounds instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static MeshoptBounds calloc(MemoryStack stack)
      Returns a new MeshoptBounds instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static MeshoptBounds.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new MeshoptBounds.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static MeshoptBounds.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new MeshoptBounds.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ncenter

      public static FloatBuffer ncenter(long struct)
      Unsafe version of center().
    • ncenter

      public static float ncenter(long struct, int index)
      Unsafe version of center.
    • nradius

      public static float nradius(long struct)
      Unsafe version of radius().
    • ncone_apex

      public static FloatBuffer ncone_apex(long struct)
      Unsafe version of cone_apex().
    • ncone_apex

      public static float ncone_apex(long struct, int index)
      Unsafe version of cone_apex.
    • ncone_axis

      public static FloatBuffer ncone_axis(long struct)
      Unsafe version of cone_axis().
    • ncone_axis

      public static float ncone_axis(long struct, int index)
      Unsafe version of cone_axis.
    • ncone_cutoff

      public static float ncone_cutoff(long struct)
      Unsafe version of cone_cutoff().
    • ncone_axis_s8

      public static ByteBuffer ncone_axis_s8(long struct)
      Unsafe version of cone_axis_s8().
    • ncone_axis_s8

      public static byte ncone_axis_s8(long struct, int index)
      Unsafe version of cone_axis_s8.
    • ncone_cutoff_s8

      public static byte ncone_cutoff_s8(long struct)
      Unsafe version of cone_cutoff_s8().