kfbxutilities.h

Detailed Description

Definition in filekfbxutilities.h.

#include<fbxfilesdk/components/kbaselib/kaydaradef_h.h>
#include<fbxfilesdk/components/kbaselib/kaydara.h>
#include<fbxfilesdk/kfbxplugins/kfbxscene.h>
#include<fbxfilesdk/fbxfilesdk_nsbegin.h>
#include<fbxfilesdk/fbxfilesdk_nsend.h>

Include dependency graph for kfbxutilities.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Functions

Scene cleaning
KFBX_DLL KArrayTemplate
<KFbxNode*> 
RemoveBadPolygonsFromMeshes(KFbxScene*pScene)
 Clean bad meshes in the scene by removing bad polygons.
File utilities
KFBX_DLL char * FBXGet_Internet_Source_File(const char *url)
 Get the content of a file from an hyperlink.
KFBX_DLL void FBXFree_Internet_Buffer(char *pBuf)
 Free the memory allocated byFBXGet_Internet_Source_File().
KFBX_DLLKString KFbxFullPath(const char *pRelativePath)
 Get the full path of given path (if the given path is relative path, it will take current directory as default root path.
KFBX_DLLKString KFbxExtractDirectory(const char *pFilePath)
 Extract Directory from the given file path.
KFBX_DLLKString KFbxExtractFileName(const char *pFilePath, bool pWithExtension=true)
 Extract file name from the given file path.
KFBX_DLLKString KFbxExtractFileExtension(const char *pFilePath)
 Extract the given file's extension.
KFBX_DLLKString KFbxChangeFileExtension(const char *pFilePath, const char *pNewExtension)
 This function is used to change the given file's extension with given new extension, if the given file haven't extension,it will directly add the new extension at the end of given file.
KFBX_DLLKString KFbxCleanPath(const char *pFilePath)
 Clean the redundant and useless denotations in given path name.
KFBX_DLLKString KFbxGetRelativeFilePath(const char *pRootPath, const char *pNewFilePath)
 Get the given new path's relative path to the given root path.
KFBX_DLL bool KFbxIsRelativePath(const char *pFilePath)
 Test if the given path is relative path, if it is return true.
KFBX_DLL bool KFbxFileExist(const char *pFilePath)
 Find if the given file exist.If the given file without directory, it will find the file in the work directroy.
KFBX_DLL bool KFbxEnsureDirectoryExistance(const char *pFilePath)
 Test if the given directory exists, if the directory does not exist, it will create this directory.
KFBX_DLLKString KFbxGetApplicationDirectory()
 Get the application directory.
KFBX_DLLKString KFbxMakeFullPath(const char *pRootPath, const char *pFilePath)
 Get the full path.
KFBX_DLL size_t KGetProcessVirtualMemoryAvailSize()
 Returns the amount of virtual memory available to the process; will take into account swap file, and the process address space if there are such limits (ie: Win32 process can access 2, 3 or 4gb depending on the OS they're running on, Win64 has a much larger limit, limited possibly by the swap file).

Function Documentation

KFBX_DLL void FBXFree_Internet_Buffer(char * pBuf ) 

Free the memory allocated byFBXGet_Internet_Source_File().

Parameters:
pBuf Pointer previously returned by a call toFBXGet_Internet_Source_File().

KFBX_DLL char* FBXGet_Internet_Source_File(const char * url ) 

Get the content of a file from an hyperlink.

Parameters:
url The hyperlink to the file. The URL must start with<http://>ex:http://www.autodesk.com.
Returns:
An allocated<char *buffer>containing the source text. You must useFBXFree_Internet_Buffer()to free the allocated memory.

KFBX_DLLKStringKFbxChangeFileExtension(const char * pFilePath,
const char * pNewExtension 
)

This function is used to change the given file's extension with given new extension, if the given file haven't extension,it will directly add the new extension at the end of given file.

The given new extension must add "." before the extension name.

Parameters:
pFilePath The old file path.
pNewExtension The given new extension, it must add "." before the extension name
Returns:
New file path with new extension name.

KFBX_DLLKStringKFbxCleanPath(const char * pFilePath ) 

Clean the redundant and useless denotations in given path name.

Parameters:
pFilePath The file path.
Returns:
Cleaned path.

KFBX_DLL bool KFbxEnsureDirectoryExistance(const char * pFilePath ) 

Test if the given directory exists, if the directory does not exist, it will create this directory.

Parameters:
pFilePath The given file path
Returns:
Trueif the directory exists or is created successfully,Falseif the directory does not exist nor isn't created successfully.

KFBX_DLLKStringKFbxExtractDirectory(const char * pFilePath ) 

Extract Directory from the given file path.

Parameters:
pFilePath The given file path.
Returns:
The directory without file name.If there isn't any '\' or '/' in the given file path, it will directly return the given file path.

KFBX_DLLKStringKFbxExtractFileExtension(const char * pFilePath ) 

Extract the given file's extension.

Parameters:
pFilePath The given file path.
Returns:
The file extension.

KFBX_DLLKStringKFbxExtractFileName(const char * pFilePath,
bool pWithExtension=true 
)

Extract file name from the given file path.

Parameters:
pFilePath The given file path.
pWithExtension Decide the file name with extension or without extension. If it is true, return the file name with extension,if it is false, return the file name without extension.
Returns:
The file name.

KFBX_DLL bool KFbxFileExist(const char * pFilePath ) 

Find if the given file exist.If the given file without directory, it will find the file in the work directroy.

Parameters:
pFilePath The given file path.
Returns:
Trueif the file exists,falseotherwise.

KFBX_DLLKStringKFbxFullPath(const char * pRelativePath ) 

Get the full path of given path (if the given path is relative path, it will take current directory as default root path.

)

Parameters:
pRelativePath The relative path.
Returns:
Full path

KFBX_DLLKStringKFbxGetApplicationDirectory( ) 

Get the application directory.

Returns:
The application directory.

KFBX_DLLKStringKFbxGetRelativeFilePath(const char * pRootPath,
const char * pNewFilePath 
)

Get the given new path's relative path to the given root path.

Parameters:
pRootPath The root path.
pNewFilePath The given new path.
Returns:
The relative path.

KFBX_DLL bool KFbxIsRelativePath(const char * pFilePath ) 

Test if the given path is relative path, if it is return true.

Parameters:
pFilePath The given file path.
Returns:
Trueif it is a relative path,falseotherwise.

KFBX_DLLKStringKFbxMakeFullPath(const char * pRootPath,
const char * pFilePath 
)

Get the full path.

Parameters:
pRootPath The root path.
pFilePath The file path.

KFBX_DLL size_t KGetProcessVirtualMemoryAvailSize( ) 

Returns the amount of virtual memory available to the process; will take into account swap file, and the process address space if there are such limits (ie: Win32 process can access 2, 3 or 4gb depending on the OS they're running on, Win64 has a much larger limit, limited possibly by the swap file).

KFBX_DLL KArrayTemplate<KFbxNode*>RemoveBadPolygonsFromMeshes(KFbxScenepScene ) 

Clean bad meshes in the scene by removing bad polygons.

Parameters:
pScene Pointer to the scene object.
Returns:
Array of nodes containing modified meshes.