- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxwriter.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_WRITER_H_
    00014 #define _FBXSDK_FILEIO_WRITER_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/utils/fbxrenamingstrategy.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00022 class FbxStatus;
    00023 class FbxManager;
    00024 class FbxFile;
    00025 class FbxStream;
    00026 class FbxObject;
    00027 class FbxDocument;
    00028 class FbxScene;
    00029 class FbxExporter;
    00030 class FbxIO;
    00031 class FbxIOSettings;
    00032 class FbxProgress;
    00033
    00034 #define IOSP GetIOSettings()
    00035
    00058 class FBXSDK_DLL FbxWriter
    00059 {
    00060 public:
    00066     FbxWriter(FbxManager& pManager, int pID, FbxStatus& pStatus);
    00067
    00069     virtual ~FbxWriter();
    00070
    00074     enum EInfoRequest
    00075     {
    00076         eInfoExtension,
    00077         eInfoDescriptions,
    00078         eInfoVersions,
    00079         eInfoCompatibleDesc,
    00080         eInfoUILabel,
    00081         eReserved1 = 0xFBFB,
    00082     };
    00083
    00085     typedef FbxWriter*              (*CreateFuncType)(FbxManager& pManager, FbxExporter& pExporter, int pSubID, int pPluginID);
    00086
    00088     typedef void                    (*IOSettingsFillerFuncType)(FbxIOSettings& pIOS);
    00089
    00091     typedef void*                   (*GetInfoFuncType)(EInfoRequest pRequest, int pWriterTypeId);
    00092
    00096     virtual bool                    FileCreate(char* pFileName) = 0;
    00097
    00102     virtual bool                    FileCreate(FbxStream* pStream, void* pStreamData);
    00103
    00106     virtual bool                    FileClose() = 0;
    00107
    00110     virtual bool                    IsFileOpen() = 0;
    00111
    00114     virtual void                    GetWriteOptions() = 0;
    00115
    00119     virtual bool                    Write(FbxDocument* pDocument) = 0;
    00120
    00124     virtual bool                    PreprocessScene(FbxScene &pScene) = 0;
    00125
    00129     virtual bool                    PostprocessScene(FbxScene &pScene) = 0;
    00130
    00131 #ifndef FBXSDK_ENV_WINRT
    00132
    00140     virtual void                    PluginWriteParameters(FbxObject& pParams);
    00141 #endif /* !FBXSDK_ENV_WINRT */
    00142
    00147     virtual FbxNode*                FindRootNode(FbxScene& pScene);
    00148
    00156     virtual bool                    CheckSpaceInNodeNameRecursive(FbxNode* pNode, FbxString& pNodeNameList);
    00157
    00161     bool                            SetFileExportVersion(FbxString pVersion);
    00162
    00166     void                            SetRenamingMode(FbxSceneRenamer::ERenamingMode pRenamingMode){mRenamingMode = pRenamingMode;}
    00167
    00171     inline void                     SetResamplingRate(double pResamplingRate){mResamplingRate = pResamplingRate;}
    00172
    00177     bool                            IsGenuine();
    00178
    00183     virtual FbxIOSettings * GetIOSettings();
    00184
    00188     virtual void SetIOSettings(FbxIOSettings * pIOSettings);
    00189
    00193     virtual void SetProgressHandler(FbxProgress* /*pProgress*/){}
    00194
    00196     virtual bool SupportsStreams() const;
    00197
    00198 protected:
    00199 #ifndef FBXSDK_ENV_WINRT
    00200
    00201     void                            PluginsWriteBegin(FbxScene& pScene);
    00207     void                            PluginsWrite(FbxIO& pFbx, bool pWriteObjectId);
    00209     void                            PluginsWriteEnd(FbxScene& pScene);
    00210 #endif /* !FBXSDK_ENV_WINRT */
    00211
    00212 /*****************************************************************************************************************************
    00213 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00214 *****************************************************************************************************************************/
    00215 public:
    00216 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00217     FbxStatus& GetStatus()              { return mStatus; }
    00218
    00219 protected:
    00220
    00221     FbxWriter&                      operator=(FbxWriter const&) { return *this; }
    00222
    00223     FbxStatus&                          mStatus;
    00224     FbxManager&                         mManager;
    00225     FbxString                           mFileVersion;
    00227     double                              mResamplingRate;
    00229     FbxSceneRenamer::ERenamingMode      mRenamingMode;
    00230
    00231 private:
    00232     int                                 mInternalID;
    00233     FbxIOSettings *                     mIOSettings;
    00234
    00235     friend struct FbxWriterFbx7_Impl;
    00236 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00237 };
    00238
    00240 #define IOS_REF (*GetIOSettings())
    00241
    00242 #include <fbxsdk/fbxsdk_nsend.h>
    00243
    00244 #endif /* _FBXSDK_FILEIO_WRITER_H_ */