Class AISkeleton

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AISkeleton extends Struct<AISkeleton> implements NativeResource

 struct aiSkeleton {
     {@link AIString struct aiString} mName;
     unsigned int mNumBones;
     {@link AISkeletonBone struct aiSkeletonBone} ** mBones;
 }
  • 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.
    • MNUMBONES

      public static final int MNUMBONES
      The struct member offsets.
    • MBONES

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

    • AISkeleton

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

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

      public int mNumBones()
      Returns:
      the value of the mNumBones field.
    • mBones

      public PointerBuffer mBones()
      Returns:
      a PointerBuffer view of the data pointed to by the mBones field.
    • mName

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

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

      public AISkeleton mBones(PointerBuffer value)
      Sets the address of the specified PointerBuffer to the mBones field.
    • set

      public AISkeleton set(AIString mName, PointerBuffer mBones)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nmNumBones(long struct)
      Unsafe version of mNumBones().
    • nmBones

      public static PointerBuffer nmBones(long struct)
      Unsafe version of mBones.
    • nmName

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

      public static void nmNumBones(long struct, int value)
      Sets the specified value to the mNumBones field of the specified struct.
    • nmBones

      public static void nmBones(long struct, PointerBuffer value)
      Unsafe version of mBones.
    • validate

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