- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxexporter.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_FILEIO_EXPORTER_H_
    00014 #define _FBXSDK_FILEIO_EXPORTER_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/base/fbxstring.h>
    00019 #include <fbxsdk/core/fbxevent.h>
    00020
    00021 #include <fbxsdk/fileio/fbxiobase.h>
    00022 #include <fbxsdk/fileio/fbxiosettings.h>
    00023 #include <fbxsdk/fileio/fbxprogress.h>
    00024
    00025 #include <fbxsdk/utils/fbxrenamingstrategy.h>
    00026
    00027 #include <fbxsdk/fbxsdk_nsbegin.h>
    00028
    00029 class FbxDocument;
    00030 class FbxIOFileHeaderInfo;
    00031 class FbxExporter_Impl;
    00032 class FbxIO;
    00033
    00089 class FBXSDK_DLL FbxExporter : public FbxIOBase
    00090 {
    00091     FBXSDK_OBJECT_DECLARE(FbxExporter, FbxIOBase);
    00092
    00093 public:
    00106         virtual bool Initialize(const char* pFileName, int pFileFormat = -1, FbxIOSettings* pIOSettings = NULL);
    00107
    00111         bool GetExportOptions();
    00112
    00122         virtual bool Initialize(FbxStream* pStream, void* pStreamData=NULL, int pFileFormat = -1, FbxIOSettings * pIOSettings = NULL);
    00123
    00127         FbxIOSettings* GetIOSettings();
    00128
    00132         void SetIOSettings(FbxIOSettings* pIOSettings);
    00133
    00134
    00142         bool Export(FbxDocument* pDocument, bool pNonBlocking=false);
    00143
    00152         bool IsExporting(bool& pExportResult);
    00153
    00158         float GetProgress(FbxString &pStatus);
    00159
    00163         void SetProgressCallback(FbxProgressCallback pHandler);
    00165
    00173         int GetFileFormat();
    00174
    00177         bool IsFBX();
    00178
    00184         char const* const* GetCurrentWritableVersions();
    00185
    00191         bool SetFileExportVersion(FbxString pVersion, FbxSceneRenamer::ERenamingMode pRenamingMode);
    00192
    00196         inline void SetResamplingRate(double pResamplingRate){ mResamplingRate = pResamplingRate; }
    00197
    00204         void SetDefaultRenderResolution(FbxString pCamName, FbxString pResolutionMode, double pW, double pH);
    00205
    00209         FbxIOFileHeaderInfo* GetFileHeaderInfo();
    00211
    00213 //
    00214 //  WARNING!
    00215 //
    00216 //  Anything beyond these lines may not be documented accurately and is
    00217 //  subject to change without notice.
    00218 //
    00220 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00221
    00225     bool GetExportOptions(FbxIO* pFbxObject);
    00226
    00227     //Internal use only, please use the other Export function to do your exports
    00228     bool Export(FbxDocument* pDocument, FbxIO* pFbxObject);
    00229
    00230 protected:
    00231     FbxExporter(FbxManager& pManager, char const* pName);
    00232     virtual void Destruct(bool pRecursive, bool pDependents);
    00233
    00234     void Reset();
    00235     bool FileCreate();
    00236     void FileClose();
    00237
    00238     FbxExporter_Impl*               mImp;
    00239     FbxStream*                      mStream;
    00240     void*                           mStreamData;
    00241     FbxString                       mStrFileVersion;
    00242     double                          mResamplingRate;
    00243     FbxSceneRenamer::ERenamingMode  mRenamingMode;
    00244     FbxIOFileHeaderInfo*            mHeaderInfo;
    00245     FbxIOSettings*                  mIOSettings;
    00246     bool                            mClientIOSettings;
    00247
    00248 private:
    00249     bool ExportProcess(FbxDocument* pDocument);
    00250     friend void ExportThread(void*);
    00251 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00252 };
    00253
    00255 class FBXSDK_DLL FbxEventPreExport : public FbxEvent<FbxEventPreExport>
    00256 {
    00257     FBXSDK_EVENT_DECLARE(FbxEventPreExport);
    00258
    00259 public:
    00260     FbxEventPreExport(FbxDocument* pDocument) : mDocument(pDocument) {};
    00261
    00263     FbxDocument* mDocument;
    00264 };
    00265
    00267 class FBXSDK_DLL FbxEventPostExport : public FbxEvent<FbxEventPostExport>
    00268 {
    00269     FBXSDK_EVENT_DECLARE(FbxEventPostExport);
    00270
    00271 public:
    00272     FbxEventPostExport(FbxDocument* pDocument) : mDocument(pDocument) {};
    00273
    00275     FbxDocument* mDocument;
    00276 };
    00277
    00278 #include <fbxsdk/fbxsdk_nsend.h>
    00279
    00280 #endif /* _FBXSDK_FILEIO_EXPORTER_H_ */