BRE12
cimport.h
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
5 
6 Copyright (c) 2006-2012, assimp team
7 
8 All rights reserved.
9 
10 Redistribution and use of this software in source and binary forms,
11 with or without modification, are permitted provided that the following
12 conditions are met:
13 
14 * Redistributions of source code must retain the above
15  copyright notice, this list of conditions and the
16  following disclaimer.
17 
18 * Redistributions in binary form must reproduce the above
19  copyright notice, this list of conditions and the
20  following disclaimer in the documentation and/or other
21  materials provided with the distribution.
22 
23 * Neither the name of the assimp team, nor the names of its
24  contributors may be used to endorse or promote products
25  derived from this software without specific prior
26  written permission of the assimp team.
27 
28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 ---------------------------------------------------------------------------
40 */
41 
45 #ifndef AI_ASSIMP_H_INC
46 #define AI_ASSIMP_H_INC
47 #include "types.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 struct aiScene; // aiScene.h
54 struct aiFileIO; // aiFileIO.h
55 typedef void (*aiLogStreamCallback)(const char* /* message */, char* /* user */);
56 
57 // --------------------------------------------------------------------------------
63 // --------------------------------------------------------------------------------
65 {
67  aiLogStreamCallback callback;
68 
70  char* user;
71 };
72 
73 
74 // --------------------------------------------------------------------------------
84 // --------------------------------------------------------------------------------
85 struct aiPropertyStore { char sentinel; };
86 
88 typedef int aiBool;
89 
90 #define AI_FALSE 0
91 #define AI_TRUE 1
92 
93 // --------------------------------------------------------------------------------
109 ASSIMP_API const C_STRUCT aiScene* aiImportFile(
110  const char* pFile,
111  unsigned int pFlags);
112 
113 // --------------------------------------------------------------------------------
134 ASSIMP_API const C_STRUCT aiScene* aiImportFileEx(
135  const char* pFile,
136  unsigned int pFlags,
137  C_STRUCT aiFileIO* pFS);
138 
139 // --------------------------------------------------------------------------------
145 ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties(
146  const char* pFile,
147  unsigned int pFlags,
148  C_STRUCT aiFileIO* pFS,
149  const C_STRUCT aiPropertyStore* pProps);
150 
151 // --------------------------------------------------------------------------------
182 ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory(
183  const char* pBuffer,
184  unsigned int pLength,
185  unsigned int pFlags,
186  const char* pHint);
187 
188 // --------------------------------------------------------------------------------
194 ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties(
195  const char* pBuffer,
196  unsigned int pLength,
197  unsigned int pFlags,
198  const char* pHint,
199  const C_STRUCT aiPropertyStore* pProps);
200 
201 // --------------------------------------------------------------------------------
216 ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
217  const C_STRUCT aiScene* pScene,
218  unsigned int pFlags);
219 
220 // --------------------------------------------------------------------------------
240 ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream(
241  C_ENUM aiDefaultLogStream pStreams,
242  const char* file);
243 
244 // --------------------------------------------------------------------------------
254 ASSIMP_API void aiAttachLogStream(
255  const C_STRUCT aiLogStream* stream);
256 
257 // --------------------------------------------------------------------------------
264 ASSIMP_API void aiEnableVerboseLogging(aiBool d);
265 
266 // --------------------------------------------------------------------------------
275 ASSIMP_API C_ENUM aiReturn aiDetachLogStream(
276  const C_STRUCT aiLogStream* stream);
277 
278 // --------------------------------------------------------------------------------
286 ASSIMP_API void aiDetachAllLogStreams(void);
287 
288 // --------------------------------------------------------------------------------
294 ASSIMP_API void aiReleaseImport(
295  const C_STRUCT aiScene* pScene);
296 
297 // --------------------------------------------------------------------------------
304 ASSIMP_API const char* aiGetErrorString();
305 
306 // --------------------------------------------------------------------------------
313 ASSIMP_API aiBool aiIsExtensionSupported(
314  const char* szExtension);
315 
316 // --------------------------------------------------------------------------------
324 ASSIMP_API void aiGetExtensionList(
325  C_STRUCT aiString* szOut);
326 
327 // --------------------------------------------------------------------------------
332 ASSIMP_API void aiGetMemoryRequirements(
333  const C_STRUCT aiScene* pIn,
334  C_STRUCT aiMemoryInfo* in);
335 
336 
337 
338 // --------------------------------------------------------------------------------
344 ASSIMP_API C_STRUCT aiPropertyStore* aiCreatePropertyStore(void);
345 
346 // --------------------------------------------------------------------------------
350 ASSIMP_API void aiReleasePropertyStore(C_STRUCT aiPropertyStore* p);
351 
352 // --------------------------------------------------------------------------------
363 ASSIMP_API void aiSetImportPropertyInteger(
364  C_STRUCT aiPropertyStore* store,
365  const char* szName,
366  int value);
367 
368 // --------------------------------------------------------------------------------
379 ASSIMP_API void aiSetImportPropertyFloat(
380  C_STRUCT aiPropertyStore* store,
381  const char* szName,
382  float value);
383 
384 // --------------------------------------------------------------------------------
396 ASSIMP_API void aiSetImportPropertyString(
397  C_STRUCT aiPropertyStore* store,
398  const char* szName,
399  const C_STRUCT aiString* st);
400 
401 // --------------------------------------------------------------------------------
413 ASSIMP_API void aiSetImportPropertyMatrix(
414  C_STRUCT aiPropertyStore* store,
415  const char* szName,
416  const C_STRUCT aiMatrix4x4* mat);
417 
418 // --------------------------------------------------------------------------------
424 ASSIMP_API void aiCreateQuaternionFromMatrix(
425  C_STRUCT aiQuaternion* quat,
426  const C_STRUCT aiMatrix3x3* mat);
427 
428 // --------------------------------------------------------------------------------
438 ASSIMP_API void aiDecomposeMatrix(
439  const C_STRUCT aiMatrix4x4* mat,
440  C_STRUCT aiVector3D* scaling,
441  C_STRUCT aiQuaternion* rotation,
442  C_STRUCT aiVector3D* position);
443 
444 // --------------------------------------------------------------------------------
448 ASSIMP_API void aiTransposeMatrix4(
449  C_STRUCT aiMatrix4x4* mat);
450 
451 // --------------------------------------------------------------------------------
455 ASSIMP_API void aiTransposeMatrix3(
456  C_STRUCT aiMatrix3x3* mat);
457 
458 // --------------------------------------------------------------------------------
463 ASSIMP_API void aiTransformVecByMatrix3(
464  C_STRUCT aiVector3D* vec,
465  const C_STRUCT aiMatrix3x3* mat);
466 
467 // --------------------------------------------------------------------------------
472 ASSIMP_API void aiTransformVecByMatrix4(
473  C_STRUCT aiVector3D* vec,
474  const C_STRUCT aiMatrix4x4* mat);
475 
476 // --------------------------------------------------------------------------------
481 ASSIMP_API void aiMultiplyMatrix4(
482  C_STRUCT aiMatrix4x4* dst,
483  const C_STRUCT aiMatrix4x4* src);
484 
485 // --------------------------------------------------------------------------------
490 ASSIMP_API void aiMultiplyMatrix3(
491  C_STRUCT aiMatrix3x3* dst,
492  const C_STRUCT aiMatrix3x3* src);
493 
494 // --------------------------------------------------------------------------------
498 ASSIMP_API void aiIdentityMatrix3(
499  C_STRUCT aiMatrix3x3* mat);
500 
501 // --------------------------------------------------------------------------------
505 ASSIMP_API void aiIdentityMatrix4(
506  C_STRUCT aiMatrix4x4* mat);
507 
508 
509 #ifdef __cplusplus
510 }
511 #endif
512 
513 #endif // AI_ASSIMP_H_INC
Basic data types and primitives, such as vectors or colors.
C-API: File system callbacks.
Definition: cfileio.h:76
Definition: matrix4x4.h:236
Definition: quaternion.h:119
char * user
user data to be passed to the callback
Definition: cimport.h:70
C-API: Represents a log stream.
Definition: cimport.h:64
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:251
Definition: vector3.h:134
Definition: matrix3x3.h:174
C-API: Represents an opaque set of settings to be used during importing.
Definition: cimport.h:85
aiLogStreamCallback callback
callback to be called
Definition: cimport.h:67