Class AIMeshAnim

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIMeshAnim extends Struct<AIMeshAnim> implements NativeResource

 struct aiMeshAnim {
     struct aiString mName;
     unsigned int mNumKeys;
     struct aiMeshKey * mKeys;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MNAME
      The struct member offsets.
    • MNUMKEYS

      public static final int MNUMKEYS
      The struct member offsets.
    • MKEYS

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

    • AIMeshAnim

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

      public AIString mName()
      Returns:
      a AIString view of the mName field.
    • mNumKeys

      public int mNumKeys()
      Returns:
      the value of the mNumKeys field.
    • mKeys

      public AIMeshKey.Buffer mKeys()
      Returns:
      a AIMeshKey.Buffer view of the struct array pointed to by the mKeys field.
    • mName

      public AIMeshAnim mName(AIString value)
      Copies the specified AIString to the mName field.
    • mName

      public AIMeshAnim mName(Consumer<AIString> consumer)
      Passes the mName field to the specified Consumer.
    • mKeys

      public AIMeshAnim mKeys(AIMeshKey.Buffer value)
      Sets the address of the specified AIMeshKey.Buffer to the mKeys field.
    • set

      public AIMeshAnim set(AIString mName, AIMeshKey.Buffer mKeys)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static AIString nmName(long struct)
      Unsafe version of mName().
    • nmNumKeys

      public static int nmNumKeys(long struct)
      Unsafe version of mNumKeys().
    • nmKeys

      public static AIMeshKey.Buffer nmKeys(long struct)
      Unsafe version of mKeys().
    • nmName

      public static void nmName(long struct, AIString value)
      Unsafe version of mName.
    • nmNumKeys

      public static void nmNumKeys(long struct, int value)
      Sets the specified value to the mNumKeys field of the specified struct.
    • nmKeys

      public static void nmKeys(long struct, AIMeshKey.Buffer value)
      Unsafe version of mKeys.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate