KFbxDocument
#include<kfbxdocument.h>

Inheritance diagram for KFbxDocument:

Inheritance graph
[legend]

List of all members.

Detailed Description

This class contains objects.

This class also provides access to take information.

Definition at line55of filekfbxdocument.h.


Error Management

The same error object is shared among instances of this class.

enum EError
 Error identifiers.More...
KErrorGetError()
 Retrieve error object.
EError GetLastErrorID() const
 Get last error code.
const char * GetLastErrorString() const
 Get last error string.

Document Member Manager

virtual void Clear()
 Delete all contained objects.
void AddRootMember(KFbxObject*pMember)
 Add a member.
void RootRootRemoveMember(KFbxObject*pMember)
 Remove a member.
template<class T>
T * FindRootMember(T const *pfbxType, char *pName)
 Find a member.
int GetRootMemberCount() const
 Return the number of objects in the collection.
template<class T>
int GetRootMemberCount(T const *pFBX_TYPE) const
 Return the number of objects of class T in the collection.
int GetRootMemberCount(KFbxCriteriapCriteria) const
 Return the number of objects satisfying given criteria in the collection.
KFbxObjectGetRootMember(int pIndex=0) const
 Return the index'th member of the collection.
template<class T>
T * GetRootMember(T const *pFBX_TYPE, int pIndex=0) const
 Return the index'th member of class T of the collection.
KFbxObjectGetRootMember(KFbxCriteriapCriteria, int pIndex=0) const
 Return the index'th member of the collection which satisfies given criteria.
virtual bool IsRootMember(KFbxObject*pMember) const
 Is an object part of the collection.

Scene information

KFbxDocumentInfoGetDocumentInfo() const
 Get the scene information.
void SetDocumentInfo(KFbxDocumentInfo*pSceneInfo)
 Set the scene information.

Offloading management

NOTE: The document does not own the peripheral therefore it will not attempt to delete it at destruction time.

Also, cloning the document will share the pointer to the peripheral across the cloned objects. And so will do the assignment operator.

void SetPeripheral(KFbxPeripheral*pPeripheral)
 Set the current peripheral.
virtualKFbxPeripheralGetPeripheral()
 Retrieve the peripheral of that object.
int UnloadContent()
 Offload all the unloadable objects contained in the document using the currently set offload peripheral.
int LoadContent()
 Load all the objects contained in the document with the data from the currently set offload peripheral.

Referencing management

int GetReferencingDocuments(KArrayTemplate<KFbxDocument*>&pReferencingDocuments) const
 Fills an array of pointers to documents that reference objects in this document.
int GetReferencingObjects(KFbxDocumentconst *pFromDoc, KArrayTemplate<KFbxObject*>&pReferencingObjects) const
 Fills an array of pointers to objects in a given document (pFromDoc) that reference objects in this document.
int GetReferencedDocuments(KArrayTemplate<KFbxDocument*>&pReferencedDocuments) const
 Fills an array of pointers to documents that are referenced by objects in this document.
int GetReferencedObjects(KFbxDocumentconst *pToDoc, KArrayTemplate<KFbxObject*>&pReferencedObjects) const
 Fills an array of pointers to objects in a given document (pToDoc) that are referenced by objects in this document.
KString GetPathToRootDocument(void) const
 Gets the path string to the root document, if it exists.
void GetDocumentPathToRootDocument(KArrayTemplate<KFbxDocument*>&pDocumentPath, bool pFirstCall=true) const
 Gets the document path to the root document, if it exists.
bool IsARootDocument(void)
 Tells if this document is a root document.

Take Management

bool CreateTake(char *pName)
 Create a take.
bool RemoveTake(char *pName)
 Remove a take.
bool SetCurrentTake(char *pName)
 Set the current take.
char * GetCurrentTakeName()
 Get current take name.
void FillTakeNameArray(KArrayTemplate<KString*>&pNameArray)
 Fill a string array with all existing take names.

Take Information Management

bool SetTakeInfo(constKFbxTakeInfo&pTakeInfo)
 Set take information about an available take.
KFbxTakeInfoGetTakeInfo(constKString&pTakeName)
 Get take information about an available take.

Member Enumeration Documentation

enumEError

Error identifiers.

Most of these are only used internally.

Definition at line340of filekfbxdocument.h.

Member Function Documentation

virtual void Clear( ) [virtual]

Delete all contained objects.

Reimplemented fromKFbxCollection.

Reimplemented inKFbxScene.

void AddRootMember(KFbxObjectpMember ) [inline]

Add a member.

Parameters:
pMember The member to be added.

Definition at line77of filekfbxdocument.h.

ReferencesKFbxCollection::AddMember().

void RootRootRemoveMember(KFbxObjectpMember ) [inline]

Remove a member.

Parameters:
pMember The member to be added.

Definition at line81of filekfbxdocument.h.

ReferencesKFbxCollection::RemoveMember().

T* FindRootMember(T const * pfbxType,
char * pName 
)[inline]

Find a member.

Parameters:
pfbxType Type information.
pName Member name.

Definition at line86of filekfbxdocument.h.

int GetRootMemberCount( ) const[inline]

Return the number of objects in the collection.

Definition at line89of filekfbxdocument.h.

int GetRootMemberCount(T const * pFBX_TYPE ) const[inline]

Return the number of objects of class T in the collection.

Parameters:
pFBX_TYPE Type information.
Returns:
The number of objects of class T in the collection.

Definition at line94of filekfbxdocument.h.

int GetRootMemberCount(KFbxCriteria pCriteria ) const

Return the number of objects satisfying given criteria in the collection.

Parameters:
pCriteria The given criteria.
Returns:
The number of objects satisfying given criteria

KFbxObject* GetRootMember(int pIndex=0 ) const[inline]

Return the index'th member of the collection.

Parameters:
pIndex The member index.

Definition at line104of filekfbxdocument.h.

T* GetRootMember(T const * pFBX_TYPE,
int pIndex=0 
)const[inline]

Return the index'th member of class T of the collection.

Parameters:
pFBX_TYPE Type information.
pIndex The member index.

Definition at line109of filekfbxdocument.h.

KFbxObject* GetRootMember(KFbxCriteria pCriteria,
int pIndex=0 
)const

Return the index'th member of the collection which satisfies given criteria.

Parameters:
pCriteria The given criteria.
pIndex The member index.

virtual bool IsRootMember(KFbxObjectpMember ) const[virtual]

Is an object part of the collection.

Parameters:
pMember 
Returns:
Trueif pMember is an object part of the collection,falseotherwise.

KFbxDocumentInfo* GetDocumentInfo( ) const

Get the scene information.

Returns:
Pointer to the scene information object.

Referenced byKFbxScene::GetSceneInfo().

void SetDocumentInfo(KFbxDocumentInfopSceneInfo ) 

Set the scene information.

Parameters:
pSceneInfo Pointer to the scene information object.

Referenced byKFbxScene::SetSceneInfo().

void SetPeripheral(KFbxPeripheralpPeripheral ) 

Set the current peripheral.

Parameters:
pPeripheral The peripheral to be set.

virtualKFbxPeripheral* GetPeripheral( ) [virtual]

Retrieve the peripheral of that object.

Returns:
Return the current peripheral for that object
Remarks:
A peripheral manipulates the content of an object for instance, a peripheral can load the connections of an object on demand.

Reimplemented fromKFbxObject.

int UnloadContent( ) 

Offload all the unloadable objects contained in the document using the currently set offload peripheral.

Returns:
The number of objects that the document have been able to unload.
Remarks:
Errors that occured during the operation can be inspected using theGetError()method.

int LoadContent( ) 

Load all the objects contained in the document with the data from the currently set offload peripheral.

Returns:
The number of objects reloaded.
Remarks:
Errors that occured during the operation can be inspected using theGetError()method.

int GetReferencingDocuments(KArrayTemplate<KFbxDocument*>& pReferencingDocuments ) const

Fills an array of pointers to documents that reference objects in this document.

Parameters:
pReferencingDocuments array of pointers to documents
Returns:
number of documents that reference objects in this document.

int GetReferencingObjects(KFbxDocumentconst * pFromDoc,
KArrayTemplate<KFbxObject*>& pReferencingObjects 
)const

Fills an array of pointers to objects in a given document (pFromDoc) that reference objects in this document.

Parameters:
pFromDoc pointer to the document containing referencing objects.
pReferencingObjects array of pointers to referencing objects.
Returns:
number of objects that reference objects in this document.

int GetReferencedDocuments(KArrayTemplate<KFbxDocument*>& pReferencedDocuments ) const

Fills an array of pointers to documents that are referenced by objects in this document.

Parameters:
pReferencedDocuments array of pointers to documents
Returns:
number of documents that are referenced by objects in this document.

int GetReferencedObjects(KFbxDocumentconst * pToDoc,
KArrayTemplate<KFbxObject*>& pReferencedObjects 
)const

Fills an array of pointers to objects in a given document (pToDoc) that are referenced by objects in this document.

Parameters:
pToDoc pointer to the document containing referenced objects.
pReferencedObjects array of pointers to referenced objects.
Returns:
number of objects that are referenced by objects in this document.

KStringGetPathToRootDocument(void  ) const

Gets the path string to the root document, if it exists.

void GetDocumentPathToRootDocument(KArrayTemplate<KFbxDocument*>& pDocumentPath,
bool pFirstCall=true 
)const

Gets the document path to the root document, if it exists.

Parameters:
pDocumentPath 
pFirstCall 

bool IsARootDocument(void  ) [inline]

Tells if this document is a root document.

Definition at line233of filekfbxdocument.h.

ReferencesKFbxObject::GetDocument().

bool CreateTake(char * pName ) 

Create a take.

Parameters:
pName Created take name.
Returns:
trueif not a single node, texture or material in the hierarchy had a take with this name before.

falseif at least one node, texture or material in the hierarchy had a take with this name before.

In the last case,KFbxDocument::GetLastErrorID()will returneTAKE_ERROR.

Remarks:
This function will create a new take node for every node, texture and material in the hierarchy. It may be more efficient to callKFbxTakeNodeContainer::CreateTakeNode()on the relevant nodes, textures and materials if a take only has a few of them with animation data.

bool RemoveTake(char * pName ) 

Remove a take.

Parameters:
pName Name of the take to remove.
Returns:
trueif every node, texture and material in the hierarchy have a take with this name.

falseif at least one node, texture or material in the hierarchy don't have a take with this name.

In the last case,KFbxDocument::GetLastErrorID()will returneTAKE_ERROR.

Remarks:
Scans the node hierarchy, the texture list and the material list to remove all take nodes found with that name.

bool SetCurrentTake(char * pName ) 

Set the current take.

Parameters:
pName Name of the take to set.
Returns:
trueif every node, texture and material in the hierarchy have a take with this name.

falseif at least one node, texture or material in the hierarchy don't have a take with this name.

In the last case,KFbxDocument::GetLastErrorID()will returneTAKE_ERROR.

Remarks:
Scans the node hierarchy, the texture list and the material list to set all take nodes found with that name.

All nodes, textures and materials without a take node of the requested name are set to default take node. It means that, if a node, texture or material does not have the requested take, it is assumed that this node is not animated in this take.

char* GetCurrentTakeName( ) 

Get current take name.

Returns:
Current take name.

An empty string if the document has not been imported from a file and functionKFbxDocument::SetCurrentTake()has not been called previously at least once.

void FillTakeNameArray(KArrayTemplate<KString*>& pNameArray ) 

Fill a string array with all existing take names.

Parameters:
pNameArray An array of string objects.
Remarks:
Scans the node hierarchy, the texture list and the material list to find all existing take node names.

The array of string is cleared before scanning the node hierarchy.

bool SetTakeInfo(constKFbxTakeInfopTakeInfo ) 

Set take information about an available take.

Parameters:
pTakeInfo Take information, fieldKFbxTakeInfo::mNamespecifies the targeted take.
Returns:
trueif take is found and take information set.

KFbxTakeInfo* GetTakeInfo(constKStringpTakeName ) 

Get take information about an available take.

Parameters:
pTakeName Take name.
Returns:
Pointer to take information orNULLif take isn't found or has no information set.

KError&GetError( ) 

Retrieve error object.

Returns:
Reference to error object.

EErrorGetLastErrorID( ) const

Get last error code.

Returns:
Last error code.

const char* GetLastErrorString( ) const

Get last error string.

Returns:
Textual description of the last error.