importerdesc.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. ---------------------------------------------------------------------------
  3. Open Asset Import Library (assimp)
  4. ---------------------------------------------------------------------------
  5. Copyright (c) 2006-2012, assimp team
  6. All rights reserved.
  7. Redistribution and use of this software in source and binary forms,
  8. with or without modification, are permitted provided that the following
  9. conditions are met:
  10. * Redistributions of source code must retain the above
  11. copyright notice, this list of conditions and the
  12. following disclaimer.
  13. * Redistributions in binary form must reproduce the above
  14. copyright notice, this list of conditions and the
  15. following disclaimer in the documentation and/or other
  16. materials provided with the distribution.
  17. * Neither the name of the assimp team, nor the names of its
  18. contributors may be used to endorse or promote products
  19. derived from this software without specific prior
  20. written permission of the assimp team.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. ---------------------------------------------------------------------------
  33. */
  34. /** @file importerdesc.h
  35. * @brief #aiImporterFlags, aiImporterDesc implementation.
  36. */
  37. #ifndef INCLUDED_AI_IMPORTER_DESC_H
  38. #define INCLUDED_AI_IMPORTER_DESC_H
  39. /** Mixed set of flags for #aiImporterDesc, indicating some features
  40. * common to many importers*/
  41. enum aiImporterFlags
  42. {
  43. /** Indicates that there is a textual encoding of the
  44. * file format; and that it is supported.*/
  45. aiImporterFlags_SupportTextFlavour = 0x1,
  46. /** Indicates that there is a binary encoding of the
  47. * file format; and that it is supported.*/
  48. aiImporterFlags_SupportBinaryFlavour = 0x2,
  49. /** Indicates that there is a compressed encoding of the
  50. * file format; and that it is supported.*/
  51. aiImporterFlags_SupportCompressedFlavour = 0x4,
  52. /** Indicates that the importer reads only a very particular
  53. * subset of the file format. This happens commonly for
  54. * declarative or procedural formats which cannot easily
  55. * be mapped to #aiScene */
  56. aiImporterFlags_LimitedSupport = 0x8,
  57. /** Indicates that the importer is highly experimental and
  58. * should be used with care. This only happens for trunk
  59. * (i.e. SVN) versions, experimental code is not included
  60. * in releases. */
  61. aiImporterFlags_Experimental = 0x10,
  62. };
  63. /** Meta information about a particular importer. Importers need to fill
  64. * this structure, but they can freely decide how talkative they are.
  65. * A common use case for loader meta info is a user interface
  66. * in which the user can choose between various import/export file
  67. * formats. Building such an UI by hand means a lot of maintenance
  68. * as importers/exporters are added to Assimp, so it might be useful
  69. * to have a common mechanism to query some rough importer
  70. * characteristics. */
  71. struct aiImporterDesc
  72. {
  73. /** Full name of the importer (i.e. Blender3D importer)*/
  74. const char* mName;
  75. /** Original author (left blank if unknown or whole assimp team) */
  76. const char* mAuthor;
  77. /** Current maintainer, left blank if the author maintains */
  78. const char* mMaintainer;
  79. /** Implementation comments, i.e. unimplemented features*/
  80. const char* mComments;
  81. /** Any combination of the #aiLoaderFlags enumerated values.
  82. These flags indicate some characteristics common to many
  83. importers. */
  84. unsigned int mFlags;
  85. /** Minimum format version that can be loaded im major.minor format,
  86. both are set to 0 if there is either no version scheme
  87. or if the loader doesn't care. */
  88. unsigned int mMinMajor;
  89. unsigned int mMinMinor;
  90. /** Maximum format version that can be loaded im major.minor format,
  91. both are set to 0 if there is either no version scheme
  92. or if the loader doesn't care. Loaders that expect to be
  93. forward-compatible to potential future format versions should
  94. indicate zero, otherwise they should specify the current
  95. maximum version.*/
  96. unsigned int mMaxMajor;
  97. unsigned int mMaxMinor;
  98. /** List of file extensions this importer can handle.
  99. List entries are separated by space characters.
  100. All entries are lower case without a leading dot (i.e.
  101. "xml dae" would be a valid value. Note that multiple
  102. importers may respond to the same file extension -
  103. assimp calls all importers in the order in which they
  104. are registered and each importer gets the opportunity
  105. to load the file until one importer "claims" the file. Apart
  106. from file extension checks, importers typically use
  107. other methods to quickly reject files (i.e. magic
  108. words) so this does not mean that common or generic
  109. file extensions such as XML would be tediously slow. */
  110. const char* mFileExtensions;
  111. };
  112. #endif