Class AIMemoryInfo

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

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

    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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • textures

        public int textures()
        Storage allocated for texture data
      • materials

        public int materials()
        Storage allocated for material data
      • meshes

        public int meshes()
        Storage allocated for mesh data
      • nodes

        public int nodes()
        Storage allocated for node data
      • animations

        public int animations()
        Storage allocated for animation data
      • cameras

        public int cameras()
        Storage allocated for camera data
      • lights

        public int lights()
        Storage allocated for light data
      • total

        public int total()
        Total storage allocated for the full import.
      • 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

        @Nullable
        public static 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​(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.
      • mallocStack

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

        @Deprecated
        public static AIMemoryInfo callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • malloc

        public static AIMemoryInfo malloc​(org.lwjgl.system.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​(org.lwjgl.system.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,
                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new AIMemoryInfo.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static AIMemoryInfo.Buffer calloc​(int capacity,
                                                 org.lwjgl.system.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().