- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxdocument.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_SCENE_DOCUMENT_H_
    00014 #define _FBXSDK_SCENE_DOCUMENT_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/scene/fbxcollection.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00022 class FbxStatus;
    00023 class FbxTakeInfo;
    00024 class FbxPeripheral;
    00025 class FbxDocumentInfo;
    00026
    00046 class FBXSDK_DLL FbxDocument : public FbxCollection
    00047 {
    00048     FBXSDK_OBJECT_DECLARE(FbxDocument, FbxCollection);
    00049
    00050 public:
    00055         FbxPropertyT<FbxReference> Roots;
    00057
    00062
    00063         virtual void  Clear();
    00064
    00068         inline void AddRootMember(FbxObject* pMember){ AddMember(pMember); Roots.ConnectSrcObject(pMember); }
    00069
    00073         inline void RootRootRemoveMember(FbxObject* pMember){ RemoveMember(pMember); Roots.DisconnectSrcObject(pMember); }
    00074
    00079         template <class T> FBX_DEPRECATED inline T* FindRootMember(const T* pfbxType, char* pName){ return Roots.FindSrcObject<T>(pName); }
    00080
    00083         template <class T> inline T* FindRootMember(char* pName){ return Roots.FindSrcObject<T>(pName); }
    00084
    00086         inline int GetRootMemberCount () const { return Roots.GetSrcObjectCount(); }
    00087
    00092         template <class T> FBX_DEPRECATED inline int GetRootMemberCount(const T* pFBX_TYPE) const { return Roots.GetSrcObjectCount(T::ClassId); }
    00093
    00096         template <class T> inline int GetRootMemberCount() const { return Roots.GetSrcObjectCount<T>(); }
    00097
    00102         int GetRootMemberCount(FbxCriteria pCriteria) const;
    00103
    00107         inline FbxObject* GetRootMember(int pIndex=0) const { return Roots.GetSrcObject(pIndex); }
    00108
    00113         template <class T> FBX_DEPRECATED inline T* GetRootMember(const T* pFBX_TYPE, int pIndex=0) const  { return (T*)Roots.GetSrcObject(T::ClassId,pIndex); }
    00114
    00117         template <class T> inline T* GetRootMember(int pIndex=0) const  { return Roots.GetSrcObject<T>(pIndex); }
    00118
    00123         FbxObject* GetRootMember(FbxCriteria pCriteria, int pIndex=0) const;
    00124
    00129         virtual bool IsRootMember(FbxObject* pMember) const;
    00131
    00132
    00140         FbxDocumentInfo* GetDocumentInfo() const;
    00141
    00145         void SetDocumentInfo(FbxDocumentInfo* pSceneInfo);
    00147
    00165         void SetPeripheral(FbxPeripheral* pPeripheral);
    00166
    00170         virtual FbxPeripheral* GetPeripheral();
    00171
    00176         int UnloadContent(FbxStatus* pStatus = NULL);
    00177
    00182         int LoadContent(FbxStatus* pStatus = NULL);
    00183
    00185
    00190
    00197         int GetReferencingDocuments(FbxArray<FbxDocument*>& pReferencingDocuments) const;
    00198
    00207         int GetReferencingObjects(const FbxDocument* pFromDoc, FbxArray<FbxObject*>& pReferencingObjects) const;
    00208
    00215         int GetReferencedDocuments(FbxArray<FbxDocument*>& pReferencedDocuments) const;
    00216
    00225         int GetReferencedObjects(const FbxDocument* pToDoc, FbxArray<FbxObject*>& pReferencedObjects) const;
    00226
    00231         FbxString GetPathToRootDocument(void) const;
    00237         void GetDocumentPathToRootDocument(FbxArray<FbxDocument*>& pDocumentPath, bool pFirstCall = true) const;
    00238
    00243         bool IsARootDocument(void) { return (NULL == GetDocument()); }
    00245
    00253         FbxPropertyT<FbxString> ActiveAnimStackName;
    00254
    00264         bool CreateAnimStack(const char* pName, FbxStatus* pStatus = NULL);
    00265
    00270         bool RemoveAnimStack(const char* pName);
    00271
    00276         void FillAnimStackNameArray(FbxArray<FbxString*>& pNameArray);
    00277
    00279
    00291         bool SetTakeInfo(const FbxTakeInfo& pTakeInfo);
    00292
    00298         FbxTakeInfo* GetTakeInfo(const FbxString& pTakeName) const;
    00299
    00301
    00302 /*****************************************************************************************************************************
    00303 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00304 *****************************************************************************************************************************/
    00305 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00306     virtual FbxObject& Copy(const FbxObject& pObject);
    00307     void ConnectVideos();
    00308
    00309 protected:
    00310     virtual void Construct(const FbxDocument* pFrom);
    00311     virtual void ConstructProperties(bool pForceSet);
    00312     virtual void Destruct(bool pRecursive);
    00313
    00314     virtual bool ConnectNotify(const FbxConnectEvent& pEvent);
    00315     virtual void SetDocument(FbxDocument* pDocument);
    00316
    00317     bool         FindTakeName(const FbxString& pTakeName);
    00318
    00319     FbxArray<FbxTakeInfo*>  mTakeInfoArray;
    00320
    00321 private:
    00322     FbxPeripheral*      mPeripheral;
    00323     FbxDocumentInfo*    mDocumentInfo;
    00324 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00325 };
    00326
    00327 #include <fbxsdk/fbxsdk_nsend.h>
    00328
    00329 #endif /* _FBXSDK_SCENE_DOCUMENT_H_ */