An FBX object is an instance of FbxObject, or any other class derived from FbxObject. An instance of an object is created by invoking its class' Create() function, along with a reference to the application's FbxManager singleton, or a reference to a FbxScene object.
An object can be explicitly destroyed by invoking its Destroy() member function, or by invoking Destroy() on the FbxManager or FbxScene object used to create it. The FbxManager used to instantiate a FbxObject can be retrieved by calling FbxObject::GetFbxManager(). Observe that in the following code sample, FbxImporter inherits from FbxIO, which inherits from FbxObject.
// Assume pImporter is an instance of FbxImporter. FbxManager* lSdkManager = pImporter->GetFbxManager();
For more information on object creation and destruction, see Managing memory with the FBX SDK manager.
The FBX SDK uses the FbxProperty class to enforce strongly typed, static and/or dynamic associations of properties to instances of FbxObject. The FBX SDK property model is described in the FBX Properties topic.
Container classes such as, FbxAnimLayer, FbxAnimStack, and FbxScene inherit from the FbxCollection class. This class provides an interface to:
The FbxCollection::GetMemberCount() and FbxCollection::GetMember() functions are overloaded to accept an FbxCriteria. Consult the FbxCriteria class reference page for more information.
An FBX object can be copied by calling its Copy() member function. The assignment operator (operator=) cannot be used to copy FBX objects; it is a private member function. The following code sample illustrates how to copy a mesh object.
// Assume that lScene is a pointer to a valid scene object. FbxMesh* lSourceMesh = FbxMesh::Create (lScene, ""); // Define control points, etc. for lSourceMesh. // This mesh will be overwritten FbxMesh* lTargetMesh = FbxMesh::Create (lScene, ""); // Copy the data from lSourceMesh into lTargetMesh. Note that // the source object and the target object must be instances of // the same class (FbxMesh in this case). lTargetMesh->Copy(lSourceMesh);