00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXUTILITIES_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXUTILITIES_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 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044
00045 #include <fbxfilesdk/kfbxplugins/kfbxscene.h>
00046
00047 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00048
00049 class KFbxTexture;
00050
00055
00060 KFBX_DLL KArrayTemplate<KFbxNode*> RemoveBadPolygonsFromMeshes(KFbxScene *pScene);
00062
00063
00068
00074 KFBX_DLL char* FBXGet_Internet_Source_File(const char *url);
00075
00079 KFBX_DLL void FBXFree_Internet_Buffer(char* pBuf);
00080
00086 KFBX_DLL KString KFbxFullPath(const char* pRelativePath);
00087
00093 KFBX_DLL KString KFbxExtractDirectory(const char* pFilePath);
00094
00101 KFBX_DLL KString KFbxExtractFileName(const char* pFilePath, bool pWithExtension=true);
00102
00107 KFBX_DLL KString KFbxExtractFileExtension(const char* pFilePath);
00108
00116 KFBX_DLL KString KFbxChangeFileExtension(const char* pFilePath, const char* pNewExtension);
00117
00122 KFBX_DLL KString KFbxCleanPath(const char* pFilePath);
00123
00129 KFBX_DLL KString KFbxGetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
00130
00135 KFBX_DLL bool KFbxIsRelativePath(const char* pFilePath);
00136
00142 KFBX_DLL bool KFbxFileExist(const char* pFilePath);
00143
00148 KFBX_DLL bool KFbxEnsureDirectoryExistance(const char* pFilePath);
00149
00153 KFBX_DLL KString KFbxGetApplicationDirectory();
00154
00159 KFBX_DLL KString KFbxMakeFullPath(const char* pRootPath, const char* pFilePath);
00160
00166 KFBX_DLL size_t KGetProcessVirtualMemoryAvailSize ();
00168
00169
00170
00171 class KFile;
00172
00173 enum eFileMode {KFBX_READ, KFBX_WRITE, KFBX_READWRITE, KFBX_APPEND};
00174 enum eSeekPos {KFBX_BEGIN, KFBX_CURRENT, KFBX_END};
00175
00176 class KFBX_DLL KFbxFile
00177 {
00178 public:
00179 KFbxFile();
00180 virtual ~KFbxFile();
00181
00182 bool Open(const char* pFileName, eFileMode pMode, bool pText);
00183 bool Open(const char* pFileName, const char* pMode);
00184 bool IsOpened();
00185 void Close();
00186
00187 size_t Read(void* pBuffer, size_t pSize);
00188 char* ReadString(char* pBuffer, int pMaxSize);
00189 kInt32 ReadInt32(kInt32* pBuffer, bool pSwab=false);
00190 kUInt32 ReadUInt32(kUInt32* pBuffer, bool pSwab=false);
00191 kInt16 ReadInt16(kInt16* pBuffer, bool pSwab=false);
00192 kUInt16 ReadUInt16(kUInt16* pBuffer, bool pSwab=false);
00193 char ReadChar(char* pBuffer);
00194 kUChar ReadUChar(kUChar* pBuffer);
00195
00196 size_t Write(const void* pBuffer, size_t pSize);
00197
00198 void Seek(eSeekPos pSeekPosition, long pOffset);
00199 long GetPosition();
00200 void SetPosition(long pPosition);
00201 bool EndOfFile();
00202
00203 char* GetFullFileName();
00204 eFileMode GetFileMode();
00205 int GetError();
00206 void ClearError();
00207 void Format(const char* pFormat, ...);
00208 int Truncate(size_t pSize);
00209
00210 static int Remove(const char* pFileName);
00211 static int Rename(const char* pFileName, const char* pNewName);
00212
00213 private:
00214 KFile* mPrivateData;
00215 };
00216
00217 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00218
00219 #endif // FBXFILESDK_KFBXPLUGINS_KFBXUTILITIES_H
00220