KFbxWriter Class Reference

#include <kfbxwriter.h>

List of all members.


Detailed Description

This class provides the interface for writing files.

It is the basis for the other FBX writers.

Definition at line 64 of file kfbxwriter.h.


Public Types

enum   EError
  Error identifiers. More...

Public Member Functions

  KFbxWriter (KFbxSdkManager &pManager, int pID)
  Constructor.
virtual  ~KFbxWriter ()
  Destructor.
virtual bool  FileCreate (char *pFileName)=0
  Creates a new file.
virtual bool  FileClose ()=0
  Closes the file.
virtual bool  IsFileOpen ()=0
  Judges if the file is open.
virtual KFbxStreamOptions GetWriteOptions ()=0
  Returns the write stream options.
virtual bool  Write (KFbxDocument *pDocument, KFbxStreamOptions *pStreamOptions)=0
  Writes content to the specified file with given stream options.
virtual bool  PreprocessScene (KFbxScene &pScene)=0
  Pre-processes the scene.
virtual bool  PostprocessScene (KFbxScene &pScene)=0
  Post-processes the scene.
virtual KFbxNode FindRootNode (KFbxScene &pScene)
  Finds the selected root node in the specified scene.
virtual bool  CheckSpaceInNodeNameRecursive (KFbxNode *pNode, KString &pNodeNameList)
  Checks if there are spaces in the names of specified node (and its children nodes), and writes the returned node's name in the specified string list.
virtual void  PluginWriteParameters (KFbxObject &pParams)
  Writes settings according the specified object's settings.
bool  SetFileExportVersion (KString pVersion)
  Sets the file export version as specified.
void  SetRenamingMode (KFbxSceneRenamer::ERenamingMode pRenamingMode)
  Sets the renaming mode as specified.
void  SetResamplingRate (double pResamplingRate)
  Sets the resampling rate as specified.
bool  IsGenuine ()
  Judges if file format is an internal plug-in .
KError GetError ()
  Returns error object(s).
EError  GetLastErrorID () const
  Returns the ID of the last error that occurred when the file was written.
const char *  GetLastErrorString () const
  Returns the error string that describes the last error that occurred when the file was written.
void  GetMessage (KString &pMessage) const
  Returns a warning message that describes what occurred when the file was written.
KString GetMessage ()
  Returns a warning message that describes what occurred when the file was written.
void  ClearMessage ()
  Empties the message string.

Member Enumeration Documentation

enum EError

Error identifiers.

  • eFILE_CORRUPTED
  • eFILE_NOT_OPENED
  • eFILE_NOT_CREATED
  • eOUT_OF_DISK_SPACE
  • eSTREAM_OPTIONS_NOT_SET
  • eINVALID_DOCUMENT_HANDLE
  • eDOCUMENT_NOT_SUPPORTED
  • eUNIDENTIFIED_ERROR
  • eEMBEDDED_OUT_OF_SPACE
  • eERROR_COUNT

Definition at line 88 of file kfbxwriter.h.


Constructor & Destructor Documentation

KFbxWriter ( KFbxSdkManager pManager,
int  pID  
)

Constructor.

Parameters:
pManager  The KFbxSdkManager Object
pID  Id for current writer

virtual ~KFbxWriter (  )  [virtual]

Destructor.


Member Function Documentation

virtual bool FileCreate ( char *  pFileName  )  [pure virtual]

Creates a new file.

Parameters:
pFileName  The name of the newly created file.

virtual bool FileClose (  )  [pure virtual]

Closes the file.

virtual bool IsFileOpen (  )  [pure virtual]

Judges if the file is open.

virtual KFbxStreamOptions* GetWriteOptions (  )  [pure virtual]

Returns the write stream options.

virtual bool Write ( KFbxDocument pDocument,
KFbxStreamOptions pStreamOptions  
) [pure virtual]

Writes content to the specified file with given stream options.

Parameters:
pDocument  KFbxDocument to write file data to.
pStreamOptions  The given write stream options.

virtual bool PreprocessScene ( KFbxScene pScene  )  [pure virtual]

Pre-processes the scene.

Parameters:
pScene  The scene needs to be pre-processed.

virtual bool PostprocessScene ( KFbxScene pScene  )  [pure virtual]

Post-processes the scene.

Parameters:
pScene  The scene needs to be post-processed.

virtual KFbxNode* FindRootNode ( KFbxScene pScene  )  [virtual]

Finds the selected root node in the specified scene.

Parameters:
pScene  The scene in which the selected root node is found.
Returns:
The located root node.NULL if the selected root node cannot be found.

virtual bool CheckSpaceInNodeNameRecursive ( KFbxNode pNode,
KString pNodeNameList  
) [virtual]

Checks if there are spaces in the names of specified node (and its children nodes), and writes the returned node's name in the specified string list.

Parameters:
pNode  Specifies the node to check.
pNodeNameList  Specifies the string list where the node name that has spaces in it is recorded.
Returns:
true If there are no spaces in the name of specified node (and its children nodes), false If spaces are found.

virtual void PluginWriteParameters ( KFbxObject pParams  )  [inline, virtual]

Writes settings according the specified object's settings.

Parameters:
pParams  The specified object.

Definition at line 158 of file kfbxwriter.h.

bool SetFileExportVersion ( KString  pVersion  ) 

Sets the file export version as specified.

Parameters:
pVersion  The specified file export version.

void SetRenamingMode ( KFbxSceneRenamer::ERenamingMode  pRenamingMode  )  [inline]

Sets the renaming mode as specified.

Parameters:
pRenamingMode  The specified renaming mode.

Definition at line 168 of file kfbxwriter.h.

void SetResamplingRate ( double  pResamplingRate  )  [inline]

Sets the resampling rate as specified.

Parameters:
pResamplingRate  The specified resampling rate.

Definition at line 173 of file kfbxwriter.h.

bool IsGenuine (  ) 

Judges if file format is an internal plug-in .

Returns:
true If the file format is an internal plug-in ,false Otherwise .

KError& GetError (  ) 

Returns error object(s).

Returns:
References to the error object(s).

EError GetLastErrorID (  )  const

Returns the ID of the last error that occurred when the file was written.

Returns:
The last error ID.

const char* GetLastErrorString (  )  const

Returns the error string that describes the last error that occurred when the file was written.

Returns:
A textual description of the last error.

void GetMessage ( KString pMessage  )  const

Returns a warning message that describes what occurred when the file was written.

Parameters:
pMessage  The returned warning message.

KString& GetMessage (  ) 

Returns a warning message that describes what occurred when the file was written.

Returns:
The returned warning message.

void ClearMessage (  ) 

Empties the message string.

KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter
KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter KFbxWriter