1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
//! Defines functions to retrieve information about the version of assimp being used.
use ;
use AiString;
use ffi;
use CString;
use from_utf8;
use CStr;
/// Flags for checking how assimp was compiled
// It appears assimp doesn't expose a way to get this information using the
// c-api.
// /// #aiImporterFlags, aiImporterDesc implementation.//{{{
// /// Mixed set of flags for #aiImporterDesc, indicating some features
// /// common to many importers*/
// #[repr(C)]
// pub enum ImporterFlags {
// /// Indicates that there is a textual encoding of the
// /// file format; and that it is supported.
// aiImporterFlags_SupportTextFlavour = 0x1,
// /// Indicates that there is a binary encoding of the
// /// file format; and that it is supported.
// aiImporterFlags_SupportBinaryFlavour = 0x2,
// /// Indicates that there is a compressed encoding of the
// /// file format; and that it is supported.
// aiImporterFlags_SupportCompressedFlavour = 0x4,
// /// Indicates that the importer reads only a very particular subset of the
// /// file format.
// ///
// /// This happens commonly for declarative or procedural formats which
// /// cannot easily be mapped to #aiScene
// aiImporterFlags_LimitedSupport = 0x8,
// /// Indicates that the importer is highly experimental and should be used
// /// with care.
// ///
// /// This only happens for trunk
// /// (i.e. SVN) versions, experimental code is not included
// /// in releases. */
// aiImporterFlags_Experimental = 0x10,
// }
// /// 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.
// #[repr(C)]
// pub struct ImporterDesc {
// /// Full name of the importer (i.e. Blender3D importer)
// const char* mName;
// /// Original author (left blank if unknown or whole assimp team)
// const char* mAuthor;
// /// Current maintainer, left blank if the author maintains
// const char* mMaintainer;
// /// Implementation comments, i.e. unimplemented features
// const char* mComments;
// /// Any combination of the #aiLoaderFlags enumerated values.
// /// These flags indicate some characteristics common to many
// /// importers.
// unsigned int mFlags;
// /// Minimum format version that can be loaded im major.minor format,
// /// both are set to 0 if there is either no version scheme
// /// or if the loader doesn't care.
// unsigned int mMinMajor;
// unsigned int mMinMinor;
// /// Maximum format version that can be loaded im major.minor format,
// /// both are set to 0 if there is either no version scheme
// /// or if the loader doesn't care. Loaders that expect to be
// /// forward-compatible to potential future format versions should
// /// indicate zero, otherwise they should specify the current
// /// maximum version.
// unsigned int mMaxMajor;
// unsigned int mMaxMinor;
// /// 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.
// const char* mFileExtensions;
// }//}}}
/// Get the version number of assimp as a tuple `(major, minor, revision)`
/// Get a string containg the assimp licene
/// Get a list supported file formats in the form `*.3ds;*.obj;*.dae`.
///
/// If a file extension is contained in the list this does, of course, not
/// mean that assimp is able to load all files with this extension.
/// Returns the set compile flags
/// Check if a given compile flag is set
/// Returns whether a given file extension is supported by assimp
///
/// # Parameters
///
/// * `extension` Extension for which the function queries support for.
/// Must include a leading dot '.'. Example: '.3ds'
// vim: et tw=78 sw=4: