KFbxReader Class Reference

#include <kfbxreader.h>

List of all members.


Detailed Description

This class provides the interface for reading files.

It is the basis of other FBX readers.

Definition at line 70 of file kfbxreader.h.


Public Types

enum   EError
  Error identifiers. More...

Public Member Functions

  KFbxReader (KFbxSdkManager &pManager, int pID)
  Constructor.
virtual  ~KFbxReader ()
  Destructor.
virtual void  GetVersion (int &pMajor, int &pMinor, int &pRevision)
  Returns the file version.
virtual bool  FileOpen (char *pFileName)=0
  Opens the file with default flag.
virtual bool  FileOpen (KFile *pFile)
  Opens the file with KFile handle.
virtual bool  FileClose ()=0
  Closes the file stream.
virtual bool  IsFileOpen ()=0
  Checks if the file stream is open.
virtual KFbxStreamOptions GetReadOptions (bool pParseFileAsNeeded=true)=0
  Returns file stream options.
virtual bool  Read (KFbxDocument *pDocument, KFbxStreamOptions *pStreamOptions)=0
  Reads file with stream options.
virtual void  PluginReadParameters (KFbxObject &pParams)
  Reads all properties and flags.
virtual bool  FileOpen (char *pFileName, EFileOpenSpecialFlags pFlags)
  Opens the file with specific EFileOpenSpecialFlags.
virtual bool  GetAxisInfo (KFbxAxisSystem *pAxisSystem, KFbxSystemUnit *pSystemUnits)
  Returns the system axis information from the file.
virtual bool  GetStatistics (KFbxStatistics *pStats)
  Returns statistics from the file.
bool  GetDefaultRenderResolution (KString &pCamName, KString &pResolutionMode, double &pW, double &pH)
  If default camera resolution is OK, returns information about the resolution of the render.
bool  IsGenuine ()
  Judges if the format of the file is an internal plug-in .
KError GetError ()
  Retrieves error objects.
EError  GetLastErrorID () const
  Returns the ID of the last error that occurred when the file was read.
const char *  GetLastErrorString () const
  Returns the error string that describes the last error that occurred when the file was read.
void  GetMessage (KString &pMessage) const
  Returns a warning message that describes what occurred when the file was read.
KString GetMessage ()
  Returns a warning message that describes what occurred when the file was read.
void  ClearMessage ()
  Empties the message string.

Member Enumeration Documentation

enum EError

Error identifiers.

  • eFILE_CORRUPTED
  • eFILE_VERSION_NOT_SUPPORTED_YET
  • eFILE_VERSION_NOT_SUPPORTED_ANYMORE
  • eFILE_NOT_OPENED
  • eFILE_NOT_CREATED
  • eWRONG_PASSWORD
  • eSTREAM_OPTIONS_NOT_SET
  • eINVALID_DOCUMENT_HANDLE
  • eDOCUMENT_NOT_SUPPORTED
  • eUNRESOLVED_EXTERNAL_REFERENCES
  • eUNIDENTIFIED_ERROR
  • eERROR_COUNT

Definition at line 98 of file kfbxreader.h.


Constructor & Destructor Documentation

KFbxReader ( KFbxSdkManager pManager,
int  pID  
)

Constructor.

Parameters:
pManager  The KFbxSdkManager Object
pID  Id for current reader

virtual ~KFbxReader (  )  [virtual]

Destructor.


Member Function Documentation

virtual void GetVersion ( int &  pMajor,
int &  pMinor,
int &  pRevision  
) [inline, virtual]

Returns the file version.

Parameters:
pMajor  Major version
pMinor  Minor version
pRevision  Revision version

Definition at line 136 of file kfbxreader.h.

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

Opens the file with default flag.

Parameters:
pFileName  Name of the File to open
Returns:
If the file opens successfully return true, otherwise return false.

virtual bool FileOpen ( KFile *  pFile  )  [virtual]

Opens the file with KFile handle.

Parameters:
pFile  The KFile handle
Returns:
If the file opens successfully return true, otherwise return false.

virtual bool FileClose (  )  [pure virtual]

Closes the file stream.

Returns:
false

virtual bool IsFileOpen (  )  [pure virtual]

Checks if the file stream is open.

Returns:
false.

virtual KFbxStreamOptions* GetReadOptions ( bool  pParseFileAsNeeded = true  )  [pure virtual]

Returns file stream options.

Parameters:
pParseFileAsNeeded  Sets whether to parse file as read options
Returns:
NULL

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

Reads file with stream options.

Parameters:
pDocument  KFbxDocument to store the file data
pStreamOptions  Read options to read file
Returns:
false.

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

Reads all properties and flags.

Parameters:
pParams  Settings for assigning properties and flags

Definition at line 180 of file kfbxreader.h.

virtual bool FileOpen ( char *  pFileName,
EFileOpenSpecialFlags  pFlags  
) [inline, virtual]

Opens the file with specific EFileOpenSpecialFlags.

Parameters:
pFileName  Name of the File to open
pFlags  The EFileOpenSpecialFlags to open with
Returns:
If the file opens successfully return true, otherwise return false.

Definition at line 188 of file kfbxreader.h.

virtual bool GetAxisInfo ( KFbxAxisSystem pAxisSystem,
KFbxSystemUnit pSystemUnits  
) [inline, virtual]

Returns the system axis information from the file.

Parameters:
pAxisSystem  Axis system in file
pSystemUnits  System unit in file
Returns:
false.

Definition at line 195 of file kfbxreader.h.

virtual bool GetStatistics ( KFbxStatistics pStats  )  [inline, virtual]

Returns statistics from the file.

Parameters:
pStats  Statistics in the file.
Returns:
false.

Definition at line 201 of file kfbxreader.h.

bool GetDefaultRenderResolution ( KString pCamName,
KString pResolutionMode,
double &  pW,
double &  pH  
)

If default camera resolution is OK, returns information about the resolution of the render.

Parameters:
pCamName  Default camera name.
pResolutionMode  Default resolution mode.
pW  Default resolution width.
pH  Default resolution height.
Returns:
true If default camera resolution is OK, false Otherwise.

bool IsGenuine (  ) 

Judges if the format of the file is an internal plug-in .

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

KError& GetError (  ) 

Retrieves error objects.

Returns:
Reference to error objects.

EError GetLastErrorID (  )  const

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

Returns:
Last error ID.

const char* GetLastErrorString (  )  const

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

Returns:
A text description of the last error.

void GetMessage ( KString pMessage  )  const

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

Parameters:
pMessage  The returned warning message.

KString& GetMessage (  ) 

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

Returns:
The warning message.

void ClearMessage (  ) 

Empties the message string.

KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader
KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader KFbxReader