Class ParOctasphereConfig

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ParOctasphereConfig extends Struct<ParOctasphereConfig> implements NativeResource

 struct par_octasphere_config {
     float corner_radius;
     float width;
     float height;
     float depth;
     int num_subdivisions;
     par_octasphere_uv_mode uv_mode;
     par_octasphere_normals_mode normals_mode;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int CORNER_RADIUS
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • DEPTH

      public static final int DEPTH
      The struct member offsets.
    • NUM_SUBDIVISIONS

      public static final int NUM_SUBDIVISIONS
      The struct member offsets.
    • UV_MODE

      public static final int UV_MODE
      The struct member offsets.
    • NORMALS_MODE

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

    • ParOctasphereConfig

      public ParOctasphereConfig(ByteBuffer container)
      Creates a ParOctasphereConfig 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<ParOctasphereConfig>
    • corner_radius

      public float corner_radius()
      Returns:
      the value of the corner_radius field.
    • width

      public float width()
      Returns:
      the value of the width field.
    • height

      public float height()
      Returns:
      the value of the height field.
    • depth

      public float depth()
      Returns:
      the value of the depth field.
    • num_subdivisions

      public int num_subdivisions()
      Returns:
      the value of the num_subdivisions field.
    • uv_mode

      public int uv_mode()
      Returns:
      the value of the uv_mode field.
    • normals_mode

      public int normals_mode()
      Returns:
      the value of the normals_mode field.
    • corner_radius

      public ParOctasphereConfig corner_radius(float value)
      Sets the specified value to the corner_radius field.
    • width

      public ParOctasphereConfig width(float value)
      Sets the specified value to the width field.
    • height

      public ParOctasphereConfig height(float value)
      Sets the specified value to the height field.
    • depth

      public ParOctasphereConfig depth(float value)
      Sets the specified value to the depth field.
    • num_subdivisions

      public ParOctasphereConfig num_subdivisions(int value)
      Sets the specified value to the num_subdivisions field.
    • uv_mode

      public ParOctasphereConfig uv_mode(int value)
      Sets the specified value to the uv_mode field.
    • normals_mode

      public ParOctasphereConfig normals_mode(int value)
      Sets the specified value to the normals_mode field.
    • set

      public ParOctasphereConfig set(float corner_radius, float width, float height, float depth, int num_subdivisions, int uv_mode, int normals_mode)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ParOctasphereConfig.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ParOctasphereConfig.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
    • ncorner_radius

      public static float ncorner_radius(long struct)
      Unsafe version of corner_radius().
    • nwidth

      public static float nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static float nheight(long struct)
      Unsafe version of height().
    • ndepth

      public static float ndepth(long struct)
      Unsafe version of depth().
    • nnum_subdivisions

      public static int nnum_subdivisions(long struct)
      Unsafe version of num_subdivisions().
    • nuv_mode

      public static int nuv_mode(long struct)
      Unsafe version of uv_mode().
    • nnormals_mode

      public static int nnormals_mode(long struct)
      Unsafe version of normals_mode().
    • ncorner_radius

      public static void ncorner_radius(long struct, float value)
      Unsafe version of corner_radius.
    • nwidth

      public static void nwidth(long struct, float value)
      Unsafe version of width.
    • nheight

      public static void nheight(long struct, float value)
      Unsafe version of height.
    • ndepth

      public static void ndepth(long struct, float value)
      Unsafe version of depth.
    • nnum_subdivisions

      public static void nnum_subdivisions(long struct, int value)
      Unsafe version of num_subdivisions.
    • nuv_mode

      public static void nuv_mode(long struct, int value)
      Unsafe version of uv_mode.
    • nnormals_mode

      public static void nnormals_mode(long struct, int value)
      Unsafe version of normals_mode.