Go to the documentation of this file.
46 #ifndef AI_EXPORT_HPP_INC
47 #define AI_EXPORT_HPP_INC
50 #pragma GCC system_header
53 #ifndef ASSIMP_BUILD_NO_EXPORT
96 fpExportFunc mExportFunction;
99 unsigned int mEnforcePP;
102 ExportFormatEntry(
const char *pId,
const char *pDesc,
const char *pExtension, fpExportFunc pFunction,
unsigned int pEnforcePP = 0u) {
103 mDescription.
id = pId;
106 mExportFunction = pFunction;
107 mEnforcePP = pEnforcePP;
113 mDescription.
id =
nullptr;
194 unsigned int pPreprocessing = 0u,
const ExportProperties *pProperties =
nullptr);
196 unsigned int pPreprocessing = 0u,
const ExportProperties *pProperties =
nullptr);
232 unsigned int pPreprocessing = 0u,
const ExportProperties *pProperties =
nullptr);
233 aiReturn Export(
const aiScene *pScene,
const std::string &pFormatId,
const std::string &pPath,
234 unsigned int pPreprocessing = 0u,
const ExportProperties *pProperties =
nullptr);
320 ExporterPimpl *pimpl;
326 typedef unsigned int KeyType;
330 typedef std::map<KeyType, int> IntPropertyMap;
331 typedef std::map<KeyType, ai_real> FloatPropertyMap;
332 typedef std::map<KeyType, std::string> StringPropertyMap;
333 typedef std::map<KeyType, aiMatrix4x4> MatrixPropertyMap;
334 typedef std::map<KeyType, std::function<
void *(
void *)>> CallbackPropertyMap;
373 return SetPropertyInteger(szName, value);
394 bool SetPropertyCallback(
const char *szName,
const std::function<
void *(
void *)> &f);
410 int iErrorReturn = 0xffffffff)
const;
420 return GetPropertyInteger(szName, bErrorReturn) != 0;
428 ai_real fErrorReturn = 10e10f)
const;
437 const std::string &sErrorReturn =
"")
const;
448 std::function<
void *(
void *)> GetPropertyCallback(
const char* szName)
const;
476 bool HasPropertyCallback(
const char *szName)
const;
490 CallbackPropertyMap mCallbackProperties;
496 return ExportToBlob(pScene, pFormatId.c_str(), pPreprocessing, pProperties);
501 const std::string &pPath,
unsigned int pPreprocessing,
503 return Export(pScene, pFormatId.c_str(), pPath.c_str(), pPreprocessing, pProperties);
508 #endif // ASSIMP_BUILD_NO_EXPORT
509 #endif // AI_EXPORT_HPP_INC
bool GetPropertyBool(const char *szName, bool bErrorReturn=false) const
Definition: Exporter.hpp:419
const char * GetErrorString() const
bool HasPropertyInteger(const char *szName) const
Definition: cexport.h:200
void SetProgressHandler(ProgressHandler *pHandler)
void UnregisterExporter(const char *id)
bool HasPropertyFloat(const char *szName) const
FloatPropertyMap mFloatProperties
Definition: Exporter.hpp:482
MatrixPropertyMap mMatrixProperties
Definition: Exporter.hpp:488
bool SetPropertyString(const char *szName, const std::string &sValue)
StringPropertyMap mStringProperties
Definition: Exporter.hpp:485
~Exporter()
The class destructor.
bool SetPropertyFloat(const char *szName, ai_real fValue)
const aiExportFormatDesc * GetExportFormatDescription(size_t pIndex) const
aiReturn
Definition: types.h:397
class ASSIMP_API ExportProperties
Definition: Exporter.hpp:83
const aiMatrix4x4 GetPropertyMatrix(const char *szName, const aiMatrix4x4 &sErrorReturn=aiMatrix4x4()) const
IOSystem * GetIOHandler() const
const aiExportDataBlob * GetBlob() const
IntPropertyMap mIntProperties
Definition: Exporter.hpp:479
const aiExportDataBlob * GetOrphanedBlob() const
bool SetPropertyInteger(const char *szName, int iValue)
bool SetPropertyBool(const char *szName, bool value)
Definition: Exporter.hpp:372
aiReturn RegisterExporter(const ExportFormatEntry &desc)
bool IsDefaultIOHandler() const
const aiExportDataBlob * ExportToBlob(const aiScene *pScene, const char *pFormatId, unsigned int pPreprocessing=0u, const ExportProperties *pProperties=nullptr)
Definition: Exporter.hpp:85
bool HasPropertyString(const char *szName) const
bool HasPropertyMatrix(const char *szName) const
Defines the C-API for the Assimp export interface.
ExportProperties(const ExportProperties &other)
bool HasPropertyBool(const char *szName) const
aiReturn Export(const aiScene *pScene, const char *pFormatId, const char *pPath, unsigned int pPreprocessing=0u, const ExportProperties *pProperties=nullptr)
Exporter()
The class constructor.
ai_real GetPropertyFloat(const char *szName, ai_real fErrorReturn=10e10f) const
Definition: Exporter.hpp:323
aiExportFormatDesc mDescription
Public description structure to be returned by aiGetExportFormatDescription()
Definition: Exporter.hpp:93
CPP-API: Interface to the file system.
Definition: IOSystem.hpp:93
Definition: matrix4x4.h:266
const std::string GetPropertyString(const char *szName, const std::string &sErrorReturn="") const
bool SetPropertyMatrix(const char *szName, const aiMatrix4x4 &sValue)
void SetIOHandler(IOSystem *pIOHandler)
size_t GetExportFormatCount() const
Definition: Exporter.hpp:91
Definition: ai_assert.h:50
int GetPropertyInteger(const char *szName, int iErrorReturn=0xffffffff) const
CPP-API: Abstract interface for custom progress report receivers.
Definition: ProgressHandler.hpp:67