kfbximporter.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_IMPORTER_H_
00005 #define _FBXSDK_IMPORTER_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
00042
00043 #include <kaydaradef.h>
00044 #ifndef KFBX_DLL
00045 #define KFBX_DLL K_DLLIMPORT
00046 #endif
00047
00048 #include <kfbxio/kfbxio.h>
00049
00050 #include <klib/kstring.h>
00051 #include <klib/karrayul.h>
00052
00053 #include <kbaselib_forward.h>
00054 #ifndef MB_FBXSDK
00055 #include <kbaselib_nsuse.h>
00056 #endif
00057
00058 #ifdef KARCH_DEV_MACOSX_CFM
00059 #include <CFURL.h>
00060 #include <Files.h>
00061 #endif
00062
00063 #include <kfbxobject/kfbxobject_forward.h>
00064 #ifndef MB_FBXSDK
00065 #include <kfbxobject/kfbxobject_nsuse.h>
00066 #endif
00067
00068 #include <fbxfilesdk_nsbegin.h>
00069
00070 class KFbxScene;
00071 class KFbxImporterImp;
00072 class KFbxStreamOptionsFbx;
00073 class KFbxTakeInfo;
00074 class KFbxSceneInfo;
00075 class KFbxStreamOptionsFbxReader;
00076
00077
00086 class KFBX_DLL KFbxImporter : public KFbxIO
00087 {
00088 KFBXOBJECT_DECLARE(KFbxImporter);
00089 public:
00094
00100 virtual bool Initialize(const char *pFileName);
00101
00102 #ifdef KARCH_DEV_MACOSX_CFM
00103 virtual bool Initialize(const FSSpec &pMacFileSpec);
00104 virtual bool Initialize(const FSRef &pMacFileRef);
00105 virtual bool Initialize(const CFURLRef &pMacURL);
00106 #endif
00107
00115 void GetFileVersion(int& pMajor, int& pMinor, int& pRevision);
00116
00125 bool GetDefaultRenderResolution(KString& pCamName, KString& pResolutionMode, double& pW, double& pH);
00126
00132 typedef enum
00133 {
00134 eSTREAMOPTIONS_PARSE_FILE,
00135 eSTREAMOPTIONS_FAST,
00136 eSTREAMOPTIONS_COUNT
00137 } EStreamOptionsGeneration;
00138
00144 KFbxStreamOptions* GetImportOptions(EStreamOptionsGeneration pStreamOptionsGeneration = eSTREAMOPTIONS_PARSE_FILE);
00145
00151 KFbxStreamOptions* GetImportOptions(IFbxObject* pFbxObject);
00152
00162 bool Import(KFbxScene& pScene, KFbxStreamOptions* pStreamOptions = NULL);
00163
00174 bool Import(KFbxScene& pScene, KFbxStreamOptions* pStreamOptions, IFbxObject* pFbxObject);
00175
00179 void ReleaseImportOptions(KFbxStreamOptions* pStreamOptions);
00180
00182
00187 void SetPassword(char* pPassword);
00188
00193
00198 int GetTakeCount();
00199
00206 KFbxTakeInfo* GetTakeInfo(int pIndex);
00207
00212 char* GetCurrentTakeName();
00213
00215
00220
00225 KFbxSceneInfo* GetSceneInfo();
00226
00228
00232
00236 void SetFileFormat (int pFileFormat);
00237
00241 int GetFileFormat ();
00242
00245 bool IsFBX();
00247
00249
00250
00251
00252
00253
00254
00256
00257 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00258
00259 bool UpdateImportOptions(KFbxStreamOptions* pStreamOptions);
00260
00261 protected:
00262
00263
00264 void SetImportOptionsInfo(KFbxStreamOptionsFbxReader* pStreamOptionsFbx);
00265 void GetImportOptionsInfo(KFbxStreamOptionsFbxReader* pStreamOptionsFbx);
00266
00267 KFbxImporter(KFbxSdkManager& pManager,char const* pName);
00268 virtual ~KFbxImporter();
00269
00270 void Reset();
00271
00272 bool FileOpen();
00273 void FileClose();
00274
00275
00276 bool IsNativeExtension ();
00277
00278 KFbxImporterImp* mImp;
00279
00280 bool mImportOptionsDone;
00281 KArrayTemplate<KFbxTakeInfo*> mTakeInfo;
00282 KFbxSceneInfo* mSceneInfo;
00283 KString mCurrentTakeName;
00284 int mMajorVersion;
00285 int mMinorVersion;
00286 int mRevisionVersion;
00287
00288
00289
00290 bool mDefaultCameraResolutionIsOK;
00291 KString mDefaultCameraName;
00292 KString mDefaultResolutionMode;
00293 double mDefaultResolutionW;
00294 double mDefaultResolutionH;
00295
00296 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00297
00298 };
00299
00300 #include <fbxfilesdk_nsend.h>
00301
00302 #endif // #ifndef _FBXSDK_IMPORTER_H_
00303
00304