Class AIUVTransform

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIUVTransform extends Struct<AIUVTransform> implements NativeResource

 struct aiUVTransform {
     struct aiVector2D mTranslation;
     struct aiVector2D mScaling;
     float mRotation;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MTRANSLATION
      The struct member offsets.
    • MSCALING

      public static final int MSCALING
      The struct member offsets.
    • MROTATION

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

    • AIUVTransform

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

      public AIVector2D mTranslation()
      Returns:
      a AIVector2D view of the mTranslation field.
    • mScaling

      public AIVector2D mScaling()
      Returns:
      a AIVector2D view of the mScaling field.
    • mRotation

      public float mRotation()
      Returns:
      the value of the mRotation field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static AIVector2D nmTranslation(long struct)
      Unsafe version of mTranslation().
    • nmScaling

      public static AIVector2D nmScaling(long struct)
      Unsafe version of mScaling().
    • nmRotation

      public static float nmRotation(long struct)
      Unsafe version of mRotation().