Class AIImporterDesc

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

    public class AIImporterDesc
    extends Struct
    implements 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.

    Member documentation

    • mName – Full name of the importer (i.e. Blender3D importer)
    • mAuthor – Original author (left blank if unknown or whole assimp team)
    • mMaintainer – Current maintainer, left blank if the author maintains
    • mComments – Implementation comments, i.e. unimplemented features
    • mFlags – These flags indicate some characteristics common to many importers.
    • mMinMajor – Minimum major format that can be loaded in major.minor style.
    • mMinMinor – Minimum minor format that can be loaded in major.minor style.
    • mMaxMajor – Maximum major format that can be loaded in major.minor style.
    • mMaxMinor – Maximum minor format that can be loaded in major.minor style.
    • mFileExtensions – 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.

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

        public java.nio.ByteBuffer mName()
        Returns a ByteBuffer view of the null-terminated string pointed to by the mName field.
      • mNameString

        public java.lang.String mNameString()
        Decodes the null-terminated string pointed to by the mName field.
      • mAuthor

        public java.nio.ByteBuffer mAuthor()
        Returns a ByteBuffer view of the null-terminated string pointed to by the mAuthor field.
      • mAuthorString

        public java.lang.String mAuthorString()
        Decodes the null-terminated string pointed to by the mAuthor field.
      • mMaintainer

        public java.nio.ByteBuffer mMaintainer()
        Returns a ByteBuffer view of the null-terminated string pointed to by the mMaintainer field.
      • mMaintainerString

        public java.lang.String mMaintainerString()
        Decodes the null-terminated string pointed to by the mMaintainer field.
      • mComments

        public java.nio.ByteBuffer mComments()
        Returns a ByteBuffer view of the null-terminated string pointed to by the mComments field.
      • mCommentsString

        public java.lang.String mCommentsString()
        Decodes the null-terminated string pointed to by the mComments field.
      • mFlags

        public int mFlags()
        Returns the value of the mFlags field.
      • mMinMajor

        public int mMinMajor()
        Returns the value of the mMinMajor field.
      • mMinMinor

        public int mMinMinor()
        Returns the value of the mMinMinor field.
      • mMaxMajor

        public int mMaxMajor()
        Returns the value of the mMaxMajor field.
      • mMaxMinor

        public int mMaxMinor()
        Returns the value of the mMaxMinor field.
      • mFileExtensions

        public java.nio.ByteBuffer mFileExtensions()
        Returns a ByteBuffer view of the null-terminated string pointed to by the mFileExtensions field.
      • mFileExtensionsString

        public java.lang.String mFileExtensionsString()
        Decodes the null-terminated string pointed to by the mFileExtensions field.
      • 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.
      • mFlags

        public AIImporterDesc mFlags​(int value)
        Sets the specified value to the mFlags field.
      • mMinMajor

        public AIImporterDesc mMinMajor​(int value)
        Sets the specified value to the mMinMajor field.
      • mMinMinor

        public AIImporterDesc mMinMinor​(int value)
        Sets the specified value to the mMinMinor field.
      • mMaxMajor

        public AIImporterDesc mMaxMajor​(int value)
        Sets the specified value to the mMaxMajor field.
      • mMaxMinor

        public AIImporterDesc mMaxMinor​(int value)
        Sets the specified value to the mMaxMinor 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
      • createSafe

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array