Class AIImporterDesc

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

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

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 Details

    • SIZEOF

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

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

      public static final int MNAME
      The struct member offsets.
    • MAUTHOR

      public static final int MAUTHOR
      The struct member offsets.
    • MMAINTAINER

      public static final int MMAINTAINER
      The struct member offsets.
    • MCOMMENTS

      public static final int MCOMMENTS
      The struct member offsets.
    • MFLAGS

      public static final int MFLAGS
      The struct member offsets.
    • MMINMAJOR

      public static final int MMINMAJOR
      The struct member offsets.
    • MMINMINOR

      public static final int MMINMINOR
      The struct member offsets.
    • MMAXMAJOR

      public static final int MMAXMAJOR
      The struct member offsets.
    • MMAXMINOR

      public static final int MMAXMINOR
      The struct member offsets.
    • MFILEEXTENSIONS

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

    • AIImporterDesc

      public AIImporterDesc(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<AIImporterDesc>
    • mName

      public ByteBuffer mName()
      Full name of the importer (i.e. Blender3D importer)
    • mNameString

      public String mNameString()
      Full name of the importer (i.e. Blender3D importer)
    • mAuthor

      public ByteBuffer mAuthor()
      Original author (left blank if unknown or whole assimp team)
    • mAuthorString

      public String mAuthorString()
      Original author (left blank if unknown or whole assimp team)
    • mMaintainer

      public ByteBuffer mMaintainer()
      Current maintainer, left blank if the author maintains
    • mMaintainerString

      public String mMaintainerString()
      Current maintainer, left blank if the author maintains
    • mComments

      public ByteBuffer mComments()
      Implementation comments, i.e. unimplemented features
    • mCommentsString

      public 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

      public ByteBuffer 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.
    • mFileExtensionsString

      public 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(ByteBuffer value)
      Sets the address of the specified encoded string to the mName() field.
    • mAuthor

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

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

      public AIImporterDesc mComments(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(ByteBuffer value)
      Sets the address of the specified encoded string to the mFileExtensions() field.
    • set

      public AIImporterDesc set(ByteBuffer mName, ByteBuffer mAuthor, ByteBuffer mMaintainer, ByteBuffer mComments, int mFlags, int mMinMajor, int mMinMinor, int mMaxMajor, int mMaxMinor, 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(int capacity)
      Returns a new AIImporterDesc.Buffer instance allocated with BufferUtils.
      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()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static 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 ByteBuffer nmFileExtensions(long struct)
      Unsafe version of mFileExtensions().
    • nmFileExtensionsString

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

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

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

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

      public static void nmComments(long struct, 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, 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