00001 
00004 #ifndef FBXFILESDK_KFBXIO_KFBXEXPORTER_H
00005 #define FBXFILESDK_KFBXIO_KFBXEXPORTER_H
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 #include <fbxfilesdk/fbxfilesdk_def.h>
00042 
00043 #include <fbxfilesdk/kfbxio/kfbxio.h>
00044 #include <fbxfilesdk/kfbxio/kfbxiosettings.h>
00045 
00046 #include <fbxfilesdk/components/kbaselib/klib/kstring.h>
00047 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00048 #include <fbxfilesdk/kfbxio/kfbxprogress.h>
00049 
00050 #include <fbxfilesdk/kfbxplugins/kfbxrenamingstrategy.h>
00051 #include <fbxfilesdk/kfbxevents/kfbxevents.h>
00052 
00053 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00054 
00055 class KFbxDocument;
00056 class KFbxExporterImp;
00057 class KFbxFileHeaderInfo;
00058 
00060 class KFBX_DLL KFbxEventPreExport : public KFbxEvent<KFbxEventPreExport>
00061 {
00062     KFBXEVENT_DECLARE(KFbxEventPreExport);
00063 public:
00064     inline KFbxEventPreExport( KFbxDocument* pDocument ) : mDocument(pDocument) {};
00065 
00067     KFbxDocument* mDocument;
00068 };
00069 
00071 class KFBX_DLL KFbxEventPostExport : public KFbxEvent<KFbxEventPostExport>
00072 {
00073     KFBXEVENT_DECLARE(KFbxEventPostExport);
00074 public:
00075     inline KFbxEventPostExport( KFbxDocument* pDocument ) : mDocument(pDocument) {};
00076 
00078     KFbxDocument* mDocument;
00079 };
00080 
00136 class KFBX_DLL KFbxExporter : public KFbxIO
00137 {
00138     KFBXOBJECT_DECLARE(KFbxExporter, KFbxIO);
00139 
00140 public:
00141 
00146 
00155     virtual bool Initialize(const char *pFileName, int pFileFormat = -1, KFbxIOSettings * pIOSettings = NULL);
00156 
00160     bool GetExportOptions();
00161 
00165     KFbxIOSettings * GetIOSettings();
00166 
00170     void SetIOSettings(KFbxIOSettings * pIOSettings);
00171 
00172     
00180     bool Export(KFbxDocument* pDocument, bool pNonBlocking=false);
00181 
00190     bool IsExporting(bool& pExportResult);
00191 
00196     float GetProgress(KString &pStatus);
00197 
00201     void SetProgressCallback(KFbxProgressCallback pHandler);
00202     
00204 
00209 
00213     int GetFileFormat();
00214 
00217     bool IsFBX();
00218 
00224     char const* const* GetCurrentWritableVersions();
00225 
00231     bool SetFileExportVersion(KString pVersion, KFbxSceneRenamer::ERenamingMode pRenamingMode);
00232 
00236     inline void SetResamplingRate(double pResamplingRate){mResamplingRate = pResamplingRate;}
00237 
00244     void SetDefaultRenderResolution(KString pCamName, KString pResolutionMode, double pW, double pH);
00245 
00249     KFbxFileHeaderInfo* GetFileHeaderInfo();
00250 
00252 
00253 
00255 
00256 
00257 
00258 
00259 
00260 
00262 
00263 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00264 
00269     bool GetExportOptions(KFbx* pFbxObject);
00270 
00271     
00272     bool Export(KFbxDocument* pDocument, KFbx* pFbxObject);
00273 private:
00274     friend void ExportThread(void*);
00275     bool ExportProcess(KFbxDocument* pDocument);
00276 
00277 protected:
00278     KFbxExporter(KFbxSdkManager& pManager,char const *pName);
00279     virtual void Destruct(bool pRecursive, bool pDependents);
00280 
00281     void Reset();
00282 
00283     bool FileCreate();
00284     void FileClose();
00285 
00286     KFbxExporterImp* mImp;
00287 
00288     KString mStrFileVersion;
00289     double  mResamplingRate;
00290     KFbxSceneRenamer::ERenamingMode mRenamingMode;
00291     KFbxFileHeaderInfo*             mHeaderInfo;
00292     KFbxIOSettings*                 mIOSettings;
00293     bool                            mClientIOSettings;
00294 
00295 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00296 
00297 };
00298 
00299 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00300 
00301 #endif // FBXFILESDK_KFBXIO_KFBXEXPORTER_H
00302