Path Tracer
cexport.h
Go to the documentation of this file.
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
5 
6 Copyright (c) 2006-2020, 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 #pragma once
46 #ifndef AI_EXPORT_H_INC
47 #define AI_EXPORT_H_INC
48 
49 #ifdef __GNUC__
50 #pragma GCC system_header
51 #endif
52 
53 #ifndef ASSIMP_BUILD_NO_EXPORT
54 
55 #include <assimp/types.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 struct aiScene;
62 struct aiFileIO;
63 
64 // --------------------------------------------------------------------------------
76  const char *id;
77 
80  const char *description;
81 
83  const char *fileExtension;
84 };
85 
86 // --------------------------------------------------------------------------------
90 ASSIMP_API size_t aiGetExportFormatCount(void);
91 
92 // --------------------------------------------------------------------------------
100 ASSIMP_API const C_STRUCT aiExportFormatDesc *aiGetExportFormatDescription(size_t pIndex);
101 
102 // --------------------------------------------------------------------------------
107 ASSIMP_API void aiReleaseExportFormatDescription(const C_STRUCT aiExportFormatDesc *desc);
108 
109 // --------------------------------------------------------------------------------
118 ASSIMP_API void aiCopyScene(const C_STRUCT aiScene *pIn,
119  C_STRUCT aiScene **pOut);
120 
121 // --------------------------------------------------------------------------------
123 ASSIMP_API void aiFreeScene(const C_STRUCT aiScene *pIn);
124 
125 // --------------------------------------------------------------------------------
164 ASSIMP_API aiReturn aiExportScene(const C_STRUCT aiScene *pScene,
165  const char *pFormatId,
166  const char *pFileName,
167  unsigned int pPreprocessing);
168 
169 // --------------------------------------------------------------------------------
184 ASSIMP_API aiReturn aiExportSceneEx(const C_STRUCT aiScene *pScene,
185  const char *pFormatId,
186  const char *pFileName,
187  C_STRUCT aiFileIO *pIO,
188  unsigned int pPreprocessing);
189 
190 // --------------------------------------------------------------------------------
202  size_t size;
203 
205  void *data;
206 
219  C_STRUCT aiString name;
220 
223 
224 #ifdef __cplusplus
225  aiExportDataBlob() {
227  size = 0;
228  data = next = nullptr;
229  }
231  ~aiExportDataBlob() {
232  delete[] static_cast<unsigned char *>(data);
233  delete next;
234  }
235 
236  aiExportDataBlob(const aiExportDataBlob &) = delete;
237  aiExportDataBlob &operator=(const aiExportDataBlob &) = delete;
238 
239 #endif // __cplusplus
240 };
241 
242 // --------------------------------------------------------------------------------
252 ASSIMP_API const C_STRUCT aiExportDataBlob *aiExportSceneToBlob(const C_STRUCT aiScene *pScene, const char *pFormatId,
253  unsigned int pPreprocessing);
254 
255 // --------------------------------------------------------------------------------
260 ASSIMP_API void aiReleaseExportBlob(const C_STRUCT aiExportDataBlob *pData);
261 
262 #ifdef __cplusplus
263 }
264 #endif
265 
266 #endif // ASSIMP_BUILD_NO_EXPORT
267 #endif // AI_EXPORT_H_INC
aiExportDataBlob
Definition: cexport.h:200
aiReleaseExportFormatDescription
ASSIMP_API void aiReleaseExportFormatDescription(const C_STRUCT aiExportFormatDesc *desc)
types.h
aiFileIO
C-API: File system callbacks.
Definition: cfileio.h:86
aiGetExportFormatDescription
ASSIMP_API const C_STRUCT aiExportFormatDesc * aiGetExportFormatDescription(size_t pIndex)
aiExportDataBlob::name
C_STRUCT aiString name
Definition: cexport.h:219
aiExportFormatDesc::description
const char * description
Definition: cexport.h:80
aiReturn
aiReturn
Definition: types.h:397
aiCopyScene
ASSIMP_API void aiCopyScene(const C_STRUCT aiScene *pIn, C_STRUCT aiScene **pOut)
aiExportDataBlob::data
void * data
The data.
Definition: cexport.h:205
aiGetExportFormatCount
ASSIMP_API size_t aiGetExportFormatCount(void)
aiExportSceneEx
ASSIMP_API aiReturn aiExportSceneEx(const C_STRUCT aiScene *pScene, const char *pFormatId, const char *pFileName, C_STRUCT aiFileIO *pIO, unsigned int pPreprocessing)
aiExportFormatDesc::fileExtension
const char * fileExtension
Recommended file extension for the exported file in lower case.
Definition: cexport.h:83
aiExportFormatDesc
Describes an file format which Assimp can export to.
Definition: cexport.h:72
aiString
Definition: types.h:266
aiExportDataBlob::next
C_STRUCT aiExportDataBlob * next
Definition: cexport.h:222
aiReleaseExportBlob
ASSIMP_API void aiReleaseExportBlob(const C_STRUCT aiExportDataBlob *pData)
aiExportScene
ASSIMP_API aiReturn aiExportScene(const C_STRUCT aiScene *pScene, const char *pFormatId, const char *pFileName, unsigned int pPreprocessing)
aiExportSceneToBlob
ASSIMP_API const C_STRUCT aiExportDataBlob * aiExportSceneToBlob(const C_STRUCT aiScene *pScene, const char *pFormatId, unsigned int pPreprocessing)
aiExportDataBlob::size
size_t size
Size of the data in bytes.
Definition: cexport.h:202
aiFreeScene
ASSIMP_API void aiFreeScene(const C_STRUCT aiScene *pIn)
aiScene
Definition: scene.h:247
aiExportFormatDesc::id
const char * id
Definition: cexport.h:76