Class AIImporterDesc

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

    public class AIImporterDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Meta information about a particular importer. Importers need to fill this structure, but they can freely decide how talkative they are. A common use case for loader meta info is a user interface in which the user can choose between various import/export file formats. Building such an UI by hand means a lot of maintenance as importers / exporters are added to Assimp, so it might be useful to have a common mechanism to query some rough importer characteristics.

    Layout

    
     struct aiImporterDesc {
         char const * mName();
         char const * mAuthor();
         char const * mMaintainer();
         char const * mComments();
         unsigned int mFlags();
         unsigned int mMinMajor();
         unsigned int mMinMinor();
         unsigned int mMaxMajor();
         unsigned int mMaxMinor();
         char const * mFileExtensions();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MNAME, MAUTHOR, MMAINTAINER, MCOMMENTS, MFLAGS, MMINMAJOR, MMINMINOR, MMAXMAJOR, MMAXMINOR, MFILEEXTENSIONS

        The struct member offsets.
    • Constructor Detail

      • AIImporterDesc

        public AIImporterDesc​(java.nio.ByteBuffer container)
        Creates a AIImporterDesc 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
      • mName, mNameString

        public java.nio.ByteBuffer mName()
        
        public java.lang.String mNameString()
        
        Full name of the importer (i.e. Blender3D importer)
      • mAuthor, mAuthorString

        public java.nio.ByteBuffer mAuthor()
        
        public java.lang.String mAuthorString()
        
        Original author (left blank if unknown or whole assimp team)
      • mMaintainer, mMaintainerString

        public java.nio.ByteBuffer mMaintainer()
        
        public java.lang.String mMaintainerString()
        
        Current maintainer, left blank if the author maintains
      • mComments, mCommentsString

        public java.nio.ByteBuffer mComments()
        
        public java.lang.String mCommentsString()
        
        Implementation comments, i.e. unimplemented features
      • mFlags

        public int mFlags()
        These flags indicate some characteristics common to many importers.
      • mMinMajor

        public int mMinMajor()
        Minimum major format that can be loaded in major.minor style.
      • mMinMinor

        public int mMinMinor()
        Minimum minor format that can be loaded in major.minor style.
      • mMaxMajor

        public int mMaxMajor()
        Maximum major format that can be loaded in major.minor style.
      • mMaxMinor

        public int mMaxMinor()
        Maximum minor format that can be loaded in major.minor style.
      • mFileExtensions, mFileExtensionsString

        public java.nio.ByteBuffer mFileExtensions()
        
        public java.lang.String mFileExtensionsString()
        
        List of file extensions this importer can handle. List entries are separated by space characters. All entries are lower case without a leading dot (i.e. "xml dae" would be a valid value. Note that multiple importers may respond to the same file extension - assimp calls all importers in the order in which they are registered and each importer gets the opportunity to load the file until one importer "claims" the file. Apart from file extension checks, importers typically use other methods to quickly reject files (i.e. magic words) so this does not mean that common or generic file extensions such as XML would be tediously slow.
      • mName

        public AIImporterDesc mName​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the mName() field.
      • mAuthor

        public AIImporterDesc mAuthor​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the mAuthor() field.
      • mMaintainer

        public AIImporterDesc mMaintainer​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the mMaintainer() field.
      • mComments

        public AIImporterDesc mComments​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the mComments() field.
      • mFileExtensions

        public AIImporterDesc mFileExtensions​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the mFileExtensions() field.
      • set

        public AIImporterDesc set​(java.nio.ByteBuffer mName,
                                  java.nio.ByteBuffer mAuthor,
                                  java.nio.ByteBuffer mMaintainer,
                                  java.nio.ByteBuffer mComments,
                                  int mFlags,
                                  int mMinMajor,
                                  int mMinMinor,
                                  int mMaxMajor,
                                  int mMaxMinor,
                                  java.nio.ByteBuffer mFileExtensions)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static java.nio.ByteBuffer nmName​(long struct)
        Unsafe version of mName().
      • nmNameString

        public static java.lang.String nmNameString​(long struct)
        Unsafe version of mNameString().
      • nmAuthor

        public static java.nio.ByteBuffer nmAuthor​(long struct)
        Unsafe version of mAuthor().
      • nmAuthorString

        public static java.lang.String nmAuthorString​(long struct)
        Unsafe version of mAuthorString().
      • nmMaintainer

        public static java.nio.ByteBuffer nmMaintainer​(long struct)
        Unsafe version of mMaintainer().
      • nmMaintainerString

        public static java.lang.String nmMaintainerString​(long struct)
        Unsafe version of mMaintainerString().
      • nmComments

        public static java.nio.ByteBuffer nmComments​(long struct)
        Unsafe version of mComments().
      • nmCommentsString

        public static java.lang.String nmCommentsString​(long struct)
        Unsafe version of mCommentsString().
      • nmFlags

        public static int nmFlags​(long struct)
        Unsafe version of mFlags().
      • nmMinMajor

        public static int nmMinMajor​(long struct)
        Unsafe version of mMinMajor().
      • nmMinMinor

        public static int nmMinMinor​(long struct)
        Unsafe version of mMinMinor().
      • nmMaxMajor

        public static int nmMaxMajor​(long struct)
        Unsafe version of mMaxMajor().
      • nmMaxMinor

        public static int nmMaxMinor​(long struct)
        Unsafe version of mMaxMinor().
      • nmFileExtensions

        public static java.nio.ByteBuffer nmFileExtensions​(long struct)
        Unsafe version of mFileExtensions().
      • nmFileExtensionsString

        public static java.lang.String nmFileExtensionsString​(long struct)
        Unsafe version of mFileExtensionsString().
      • nmName

        public static void nmName​(long struct,
                                  java.nio.ByteBuffer value)
        Unsafe version of mName.
      • nmAuthor

        public static void nmAuthor​(long struct,
                                    java.nio.ByteBuffer value)
        Unsafe version of mAuthor.
      • nmMaintainer

        public static void nmMaintainer​(long struct,
                                        java.nio.ByteBuffer value)
        Unsafe version of mMaintainer.
      • nmComments

        public static void nmComments​(long struct,
                                      java.nio.ByteBuffer value)
        Unsafe version of mComments.
      • nmFlags

        public static void nmFlags​(long struct,
                                   int value)
        Unsafe version of mFlags.
      • nmMinMajor

        public static void nmMinMajor​(long struct,
                                      int value)
        Unsafe version of mMinMajor.
      • nmMinMinor

        public static void nmMinMinor​(long struct,
                                      int value)
        Unsafe version of mMinMinor.
      • nmMaxMajor

        public static void nmMaxMajor​(long struct,
                                      int value)
        Unsafe version of mMaxMajor.
      • nmMaxMinor

        public static void nmMaxMinor​(long struct,
                                      int value)
        Unsafe version of mMaxMinor.
      • nmFileExtensions

        public static void nmFileExtensions​(long struct,
                                            java.nio.ByteBuffer value)
        Unsafe version of mFileExtensions.
      • validate

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