Class ExrBox2i

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExrBox2i extends Struct<ExrBox2i> implements NativeResource
struct ExrBox2i {
    int32_t min_x;
    int32_t min_y;
    int32_t max_x;
    int32_t max_y;
}
  • Field Details

    • SIZEOF

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

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

      public static final int MIN_X
      The struct member offsets.
    • MIN_Y

      public static final int MIN_Y
      The struct member offsets.
    • MAX_X

      public static final int MAX_X
      The struct member offsets.
    • MAX_Y

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

    • ExrBox2i

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

      @NativeType("int32_t") public int min_x()
      Returns:
      the value of the min_x field.
    • min_y

      @NativeType("int32_t") public int min_y()
      Returns:
      the value of the min_y field.
    • max_x

      @NativeType("int32_t") public int max_x()
      Returns:
      the value of the max_x field.
    • max_y

      @NativeType("int32_t") public int max_y()
      Returns:
      the value of the max_y field.
    • min_x

      public ExrBox2i min_x(@NativeType("int32_t") int value)
      Sets the specified value to the min_x field.
    • min_y

      public ExrBox2i min_y(@NativeType("int32_t") int value)
      Sets the specified value to the min_y field.
    • max_x

      public ExrBox2i max_x(@NativeType("int32_t") int value)
      Sets the specified value to the max_x field.
    • max_y

      public ExrBox2i max_y(@NativeType("int32_t") int value)
      Sets the specified value to the max_y field.
    • set

      public ExrBox2i set(int min_x, int min_y, int max_x, int max_y)
      Initializes this struct with the specified values.
    • set

      public ExrBox2i set(ExrBox2i src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nmin_x(long struct)
      Unsafe version of min_x().
    • nmin_y

      public static int nmin_y(long struct)
      Unsafe version of min_y().
    • nmax_x

      public static int nmax_x(long struct)
      Unsafe version of max_x().
    • nmax_y

      public static int nmax_y(long struct)
      Unsafe version of max_y().
    • nmin_x

      public static void nmin_x(long struct, int value)
      Unsafe version of min_x.
    • nmin_y

      public static void nmin_y(long struct, int value)
      Unsafe version of min_y.
    • nmax_x

      public static void nmax_x(long struct, int value)
      Unsafe version of max_x.
    • nmax_y

      public static void nmax_y(long struct, int value)
      Unsafe version of max_y.