Class AIMemoryInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIMemoryInfo extends Struct<AIMemoryInfo> implements NativeResource

 struct aiMemoryInfo {
     unsigned int textures;
     unsigned int materials;
     unsigned int meshes;
     unsigned int nodes;
     unsigned int animations;
     unsigned int cameras;
     unsigned int lights;
     unsigned int total;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TEXTURES
      The struct member offsets.
    • MATERIALS

      public static final int MATERIALS
      The struct member offsets.
    • MESHES

      public static final int MESHES
      The struct member offsets.
    • NODES

      public static final int NODES
      The struct member offsets.
    • ANIMATIONS

      public static final int ANIMATIONS
      The struct member offsets.
    • CAMERAS

      public static final int CAMERAS
      The struct member offsets.
    • LIGHTS

      public static final int LIGHTS
      The struct member offsets.
    • TOTAL

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

    • AIMemoryInfo

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

      public int textures()
      Returns:
      the value of the textures field.
    • materials

      public int materials()
      Returns:
      the value of the materials field.
    • meshes

      public int meshes()
      Returns:
      the value of the meshes field.
    • nodes

      public int nodes()
      Returns:
      the value of the nodes field.
    • animations

      public int animations()
      Returns:
      the value of the animations field.
    • cameras

      public int cameras()
      Returns:
      the value of the cameras field.
    • lights

      public int lights()
      Returns:
      the value of the lights field.
    • total

      public int total()
      Returns:
      the value of the total field.
    • malloc

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static AIMemoryInfo mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static AIMemoryInfo callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIMemoryInfo mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static AIMemoryInfo callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIMemoryInfo.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AIMemoryInfo.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIMemoryInfo.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AIMemoryInfo.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static int ntextures(long struct)
      Unsafe version of textures().
    • nmaterials

      public static int nmaterials(long struct)
      Unsafe version of materials().
    • nmeshes

      public static int nmeshes(long struct)
      Unsafe version of meshes().
    • nnodes

      public static int nnodes(long struct)
      Unsafe version of nodes().
    • nanimations

      public static int nanimations(long struct)
      Unsafe version of animations().
    • ncameras

      public static int ncameras(long struct)
      Unsafe version of cameras().
    • nlights

      public static int nlights(long struct)
      Unsafe version of lights().
    • ntotal

      public static int ntotal(long struct)
      Unsafe version of total().