Class AIMemoryInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class AIMemoryInfo
    extends Struct
    implements NativeResource
    Stores the memory requirements for different components (e.g. meshes, materials, animations) of an import. All sizes are in bytes.

    Member documentation

    • textures – Storage allocated for texture data
    • materials – Storage allocated for material data
    • meshes – Storage allocated for mesh data
    • nodes – Storage allocated for node data
    • animations – Storage allocated for animation data
    • cameras – Storage allocated for camera data
    • lights – Storage allocated for light data
    • total – Total storage allocated for the full import.

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TEXTURES, MATERIALS, MESHES, NODES, ANIMATIONS, CAMERAS, LIGHTS, TOTAL

        The struct member offsets.
    • Constructor Detail

      • AIMemoryInfo

        public AIMemoryInfo​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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.
      • create

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

        @Nullable
        public static AIMemoryInfo createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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

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

        public static AIMemoryInfo callocStack​(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
      • callocStack

        public static AIMemoryInfo.Buffer callocStack​(int capacity)
        Returns a new AIMemoryInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static AIMemoryInfo.Buffer callocStack​(int capacity,
                                                      MemoryStack stack)
        Returns a new AIMemoryInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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().