Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_FILEIO_READER_H_
00014 #define _FBXSDK_FILEIO_READER_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/base/fbxarray.h>
00019 #include <fbxsdk/core/base/fbxstring.h>
00020 #include <fbxsdk/core/base/fbxtime.h>
00021 #include <fbxsdk/fileio/fbx/fbxio.h>
00022
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024
00025 class FbxManager;
00026 class FbxFile;
00027 class FbxStream;
00028 class FbxObject;
00029 class FbxDocument;
00030 class FbxDocumentInfo;
00031 class FbxScene;
00032 class FbxImporter;
00033 class FbxIOSettings;
00034 class FbxAxisSystem;
00035 class FbxStatistics;
00036 class FbxSystemUnit;
00037 class FbxNode;
00038 class FbxProgress;
00039 class FbxTakeInfo;
00040
00064 class FBXSDK_DLL FbxReader
00065 {
00066 public:
00072 FbxReader(FbxManager& pManager, int pID, FbxStatus& pStatus);
00073
00076 virtual ~FbxReader();
00077
00081 enum EInfoRequest
00082 {
00083 eInfoExtension,
00084 eInfoDescriptions,
00085 eReserved1 = 0xFBFB,
00086 };
00087
00091 enum EFileOpenSpecialFlags
00092 {
00093 eParseForGlobalSettings = 1,
00094 eParseForStatistics = 2
00095 };
00096
00098 typedef FbxReader* (*CreateFuncType)(FbxManager& pManager, FbxImporter& pImporter, int pSubID, int pPluginID);
00099
00101 typedef void (*IOSettingsFillerFuncType)(FbxIOSettings& pIOS);
00102
00104 typedef void* (*GetInfoFuncType)(EInfoRequest pRequest, int pReaderTypeId);
00105
00111 virtual void GetVersion(int& pMajor, int& pMinor, int& pRevision){ pMajor = pMinor = pRevision = 0; }
00112
00117 virtual bool FileOpen(char* pFileName) = 0;
00118
00124 virtual bool FileOpen(FbxStream* pStream, void* pStreamData);
00125
00129 virtual bool FileClose() = 0;
00130
00134 virtual bool IsFileOpen() = 0;
00135
00140 virtual bool GetReadOptions(bool pParseFileAsNeeded = true) = 0;
00141
00146 virtual bool Read(FbxDocument* pDocument) = 0;
00147
00148 #ifndef FBXSDK_ENV_WINRT
00149
00157 virtual void PluginReadParameters(FbxObject& pParams);
00158 #endif
00159
00165 virtual bool FileOpen(char* pFileName, EFileOpenSpecialFlags ){ return FileOpen(pFileName); }
00166
00172 virtual bool GetAxisInfo(FbxAxisSystem* , FbxSystemUnit* ){ return false; }
00173
00178 virtual bool GetStatistics(FbxStatistics* ){ return false; }
00179
00186 virtual bool GetFrameRate(FbxTime::EMode& pTimeMode) { pTimeMode = FbxTime::eDefaultMode; return false; }
00187
00188
00192 virtual FbxDocumentInfo* GetSceneInfo(){return NULL;}
00193
00197 virtual FbxArray<FbxTakeInfo*>* GetTakeInfo(){return NULL;}
00198
00206 virtual bool GetDefaultRenderResolution(FbxString& pCamName, FbxString& pResolutionMode, double& pW, double& pH);
00207
00212 bool IsGenuine();
00213
00218 virtual FbxIOSettings * GetIOSettings();
00219
00223 virtual void SetIOSettings(FbxIOSettings * pIOSettings);
00224
00228 virtual void SetProgressHandler(FbxProgress* ){}
00229
00230 virtual void SetEmbeddingExtractionFolder(const char* ){}
00231
00233 virtual bool SupportsStreams() const;
00234
00235
00236
00237
00238 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00239 virtual bool FileOpen(FbxFile * pFile);
00240
00241 FbxStatus& GetStatus() { return mStatus; }
00242
00243 protected:
00244 void SetDefaultRenderResolution(const char* pCamName, const char* pResolutionMode, double pW, double pH);
00245 #ifndef FBXSDK_ENV_WINRT
00246 void PluginsReadBegin(FbxScene& pScene);
00247 void PluginsRead(const char* pName, const char* pVersion);
00248 void PluginsReadEnd(FbxScene& pScene);
00249 #endif
00250 FbxReader& operator=(FbxReader const&) { return *this; }
00251 virtual bool CheckDuplicateNodeNames(FbxNode* pRootNode, FbxString& pDuplicateNodeNameList);
00252
00253 FbxStatus& mStatus;
00254 FbxManager& mManager;
00255 FbxIODefaultRenderResolution* mData;
00256
00257 private:
00258 int mInternalID;
00259 FbxIOSettings* mIOSettings;
00260
00261 friend struct FbxReaderFbx7_Impl;
00262 #endif
00263 };
00264
00266 #define IOS_REF (*GetIOSettings())
00267
00268 #include <fbxsdk/fbxsdk_nsend.h>
00269
00270 #endif