- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxexporter.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 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/fbxevent.h>
    00019 #include <fbxsdk/core/base/fbxstring.h>
    00020 #include <fbxsdk/fileio/fbxiobase.h>
    00021 #include <fbxsdk/fileio/fbxiosettings.h>
    00022 #include <fbxsdk/fileio/fbxprogress.h>
    00023 #include <fbxsdk/utils/fbxrenamingstrategy.h>
    00024
    00025 #include <fbxsdk/fbxsdk_nsbegin.h>
    00026
    00027 class FbxIO;
    00028 class FbxIOFileHeaderInfo;
    00029 class FbxThread;
    00030 class FbxWriter;
    00031
    00032 struct FbxExportThreadArg;
    00033
    00089 class FBXSDK_DLL FbxExporter : public FbxIOBase
    00090 {
    00091     FBXSDK_OBJECT_DECLARE(FbxExporter, FbxIOBase);
    00092
    00093 public:
    00107         virtual bool Initialize(const char* pFileName, int pFileFormat = -1, FbxIOSettings* pIOSettings = NULL);
    00108
    00119         virtual bool Initialize(FbxStream* pStream, void* pStreamData=NULL, int pFileFormat = -1, FbxIOSettings * pIOSettings = NULL);
    00120
    00124         bool GetExportOptions();
    00125
    00129         FbxIOSettings* GetIOSettings();
    00130
    00134         void SetIOSettings(FbxIOSettings* pIOSettings);
    00135
    00136
    00145         bool Export(FbxDocument* pDocument, bool pNonBlocking=false);
    00146
    00147     #ifndef FBXSDK_ENV_WINRT
    00148
    00156         bool IsExporting(bool& pExportResult);
    00157     #endif /* !FBXSDK_ENV_WINRT */
    00158
    00163         float GetProgress(FbxString* pStatus=NULL);
    00164
    00169         void SetProgressCallback(FbxProgressCallback pCallback, void* pArgs=NULL);
    00171
    00179         int GetFileFormat();
    00180
    00183         bool IsFBX();
    00184
    00190         char const* const* GetCurrentWritableVersions();
    00191
    00197         bool SetFileExportVersion(FbxString pVersion, FbxSceneRenamer::ERenamingMode pRenamingMode);
    00198
    00202         inline void SetResamplingRate(double pResamplingRate){ mResamplingRate = pResamplingRate; }
    00203
    00210         void SetDefaultRenderResolution(FbxString pCamName, FbxString pResolutionMode, double pW, double pH);
    00211
    00215         FbxIOFileHeaderInfo* GetFileHeaderInfo();
    00217
    00218 /*****************************************************************************************************************************
    00219 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00220 *****************************************************************************************************************************/
    00221 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00222     bool GetExportOptions(FbxIO* pFbxObject);
    00223     bool Export(FbxDocument* pDocument, FbxIO* pFbxObject);
    00224
    00225 protected:
    00226     virtual void Construct(const FbxExporter* pFrom);
    00227     virtual void Destruct(bool pRecursive);
    00228
    00229     void Reset();
    00230     bool FileCreate();
    00231     void FileClose();
    00232
    00233 private:
    00234     bool ExportProcess(FbxDocument* pDocument);
    00235
    00236     int                             mFileFormat;
    00237     FbxWriter*                      mWriter;
    00238 #ifndef FBXSDK_ENV_WINRT
    00239     FbxThread*                      mExportThread;
    00240     FbxExportThreadArg*             mExportThreadArg;
    00241     bool                            mExportThreadResult;
    00242     bool                            mIsThreadExporting;
    00243 #endif /* !FBXSDK_ENV_WINRT */
    00244     FbxProgress                     mProgress;
    00245     FbxStream*                      mStream;
    00246     void*                           mStreamData;
    00247     FbxString                       mStrFileVersion;
    00248     double                          mResamplingRate;
    00249     FbxSceneRenamer::ERenamingMode  mRenamingMode;
    00250     FbxIOFileHeaderInfo*            mHeaderInfo;
    00251     FbxIOSettings*                  mIOSettings;
    00252     bool                            mClientIOSettings;
    00253
    00254     friend void ExportThread(void*);
    00255 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00256 };
    00257
    00259 class FBXSDK_DLL FbxEventPreExport : public FbxEvent<FbxEventPreExport>
    00260 {
    00261     FBXSDK_EVENT_DECLARE(FbxEventPreExport);
    00262
    00263 public:
    00264     FbxEventPreExport(FbxDocument* pDocument) : mDocument(pDocument) {};
    00265
    00267     FbxDocument* mDocument;
    00268 };
    00269
    00271 class FBXSDK_DLL FbxEventPostExport : public FbxEvent<FbxEventPostExport>
    00272 {
    00273     FBXSDK_EVENT_DECLARE(FbxEventPostExport);
    00274
    00275 public:
    00276     FbxEventPostExport(FbxDocument* pDocument) : mDocument(pDocument) {};
    00277
    00279     FbxDocument* mDocument;
    00280 };
    00281
    00282 #include <fbxsdk/fbxsdk_nsend.h>
    00283
    00284 #endif /* _FBXSDK_FILEIO_EXPORTER_H_ */