FBX C++ API Reference
fbxobject.h File Reference

Classes

class  FbxObject
 The base class of most FBX objects. More...
 
class  FbxIterator< FbxProperty >
 A utility class for iterating over the properties (FbxProperty) of any FbxObject. More...
 
class  FbxIteratorSrcBase
 A utility class for iterating over source objects that connect to property (FbxProperty) or object (FbxObject). More...
 
class  FbxIteratorSrc< Type >
 A utility class for iterating over source objects that connect to property (FbxProperty) or object (FbxObject). More...
 
class  FbxIteratorDstBase
 A utility class for iterating over destination objects that connect to property (FbxProperty) or object (FbxObject). More...
 
class  FbxIteratorDst< Type >
 A utility class for iterating over destination objects that connect to property (FbxProperty) or object (FbxObject). More...
 

Macros

#define FBXSDK_CLASS_DECLARE(Class, Parent)
 
#define FBXSDK_FBXOBJECT_DECLARE(Class, Parent)
 
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
 Macro used to declare a new class derived from FbxObject. More...
 
#define FBXSDK_ABSTRACT_OBJECT_DECLARE(Class, Parent)
 Macro used to declare a new abstract class derived from FbxObject. More...
 
#define FBXSDK_OBJECT_IMPLEMENT(Class)
 Macro used to implement a new class derived from FbxObject. More...
 
#define FBXSDK_ABSTRACT_OBJECT_IMPLEMENT(Class)
 Macro used to implement a new abstract class derived from FbxObject. More...
 
#define FBX_TYPE(class)   ((const class*)0)
 Convert the class type parameter into a C class parameter for other function inputs. More...
 
#define FbxForEach(Iterator, Object)   for((Object)=(Iterator).GetFirst();(Object)!=0;(Object)=(Iterator).GetNext())
 Macro used to iterate over source or destination objects that connect to property (FbxProperty) or object (FbxObject). More...
 
#define FbxForEachReverse(Iterator, Object)   for(Object=(Iterator).GetLast();(Object)!=0;Object=(Iterator).GetPrevious())
 Macro used to reversely iterate over source or destination objects that connect to property (FbxProperty) or object (FbxObject) More...
 

Functions

template<class T >
T * FbxCast (FbxObject *pObject)
 Safe casting of FBX SDK objects into other FBX SDK class types. More...
 
template<class T >
const T * FbxCast (const FbxObject *pObject)
 Safe const casting of FBX SDK objects into other FBX SDK class types. More...
 

Macro Definition Documentation

◆ FBXSDK_CLASS_DECLARE

#define FBXSDK_CLASS_DECLARE (   Class,
  Parent 
)
Value:
private:\
Class(const Class&);\
Class& operator=(const Class&);\
protected:\
virtual ~Class(){};\
public:\
static FbxClassId ClassId;\
virtual FbxClassId GetClassId() const { return ClassId; }\
friend class FBXSDK_NAMESPACE::FbxManager;\
typedef Parent ParentClass;\
static Class* Create(FbxManager* pManager, const char* pName);\
SDK object manager.
Definition: fbxmanager.h:56
Internal class used to differentiate objects during run-time.
Definition: fbxclassid.h:39

Macro used to declare ClassId mechanics.

Definition at line 39 of file fbxobject.h.

◆ FBXSDK_FBXOBJECT_DECLARE

#define FBXSDK_FBXOBJECT_DECLARE (   Class,
  Parent 
)
Value:
FBXSDK_CLASS_DECLARE(Class, Parent)\
FBXSDK_FRIEND_NEW()\
static Class* Create(FbxObject* pContainer, const char* pName);\
protected:\
static Class* Allocate(FbxManager* pManager, const char* pName, const Class* pFrom);\
SDK object manager.
Definition: fbxmanager.h:56
The base class of most FBX objects.
Definition: fbxobject.h:157
#define FBXSDK_CLASS_DECLARE(Class, Parent)
Definition: fbxobject.h:39

Macro used to declare the FbxObject class.

Definition at line 53 of file fbxobject.h.

◆ FBXSDK_OBJECT_DECLARE

#define FBXSDK_OBJECT_DECLARE (   Class,
  Parent 
)
Value:
FBXSDK_FBXOBJECT_DECLARE(Class, Parent)\
protected:\
Class(FbxManager& pManager, const char* pName) : Parent(pManager, pName){};\
private: /* end of object declaration, put back private */\
SDK object manager.
Definition: fbxmanager.h:56
#define FBXSDK_FBXOBJECT_DECLARE(Class, Parent)
Definition: fbxobject.h:53

Macro used to declare a new class derived from FbxObject.

Examples:
ExportScene03/MyKFbxMesh.h.

Definition at line 61 of file fbxobject.h.

◆ FBXSDK_ABSTRACT_OBJECT_DECLARE

#define FBXSDK_ABSTRACT_OBJECT_DECLARE (   Class,
  Parent 
)
Value:
FBXSDK_CLASS_DECLARE(Class, Parent)\
protected:\
static FbxObjectCreateProc Allocate;\
Class(FbxManager& pManager, const char* pName) : Parent(pManager, pName){};\
private: /* end of object declaration, put back private */\
SDK object manager.
Definition: fbxmanager.h:56
FbxObject *(* FbxObjectCreateProc)(FbxManager &pManager, const char *pName, const FbxObject *pFrom)
The function pointer type for object constructor functions.
Definition: fbxclassid.h:26
#define FBXSDK_CLASS_DECLARE(Class, Parent)
Definition: fbxobject.h:39

Macro used to declare a new abstract class derived from FbxObject.

Definition at line 68 of file fbxobject.h.

◆ FBXSDK_OBJECT_IMPLEMENT

#define FBXSDK_OBJECT_IMPLEMENT (   Class)
Value:
FbxClassId Class::ClassId;\
Class* Class::Create(FbxManager* pManager, const char* pName)\
{\
return (Class*)pManager->CreateNewObjectFromClassId(Class::ClassId, pName);\
}\
Class* Class::Create(FbxObject* pContainer, const char* pName)\
{\
FBX_ASSERT_RETURN_VALUE(pContainer && pContainer->GetFbxManager(), NULL);\
return (Class*)pContainer->GetFbxManager()->CreateNewObjectFromClassId(Class::ClassId, pName, pContainer);\
}\
Class* Class::Allocate(FbxManager* pManager, const char* pName, const Class* pFrom)\
{\
Class* lNewObject = FbxNew<Class>(*pManager, pName);\
lNewObject->Construct(pFrom);\
lNewObject->SetObjectFlags(FbxObject::eInitialized, true);\
return lNewObject;\
}\
SDK object manager.
Definition: fbxmanager.h:56
#define NULL
Definition: fbxarch.h:210
Automatically set when FbxObject::Construct() is completed.
Definition: fbxobject.h:200
The base class of most FBX objects.
Definition: fbxobject.h:157
Internal class used to differentiate objects during run-time.
Definition: fbxclassid.h:39

Macro used to implement a new class derived from FbxObject.

Examples:
ExportScene03/MyKFbxMesh.cxx.

Definition at line 76 of file fbxobject.h.

◆ FBXSDK_ABSTRACT_OBJECT_IMPLEMENT

#define FBXSDK_ABSTRACT_OBJECT_IMPLEMENT (   Class)
Value:
FbxClassId Class::ClassId;\
FbxObjectCreateProc Class::Allocate = 0;\
Class* Class::Create(FbxManager* pManager, const char* pName)\
{\
return (Class*)pManager->CreateNewObjectFromClassId(Class::ClassId, pName);\
}\
SDK object manager.
Definition: fbxmanager.h:56
Internal class used to differentiate objects during run-time.
Definition: fbxclassid.h:39

Macro used to implement a new abstract class derived from FbxObject.

Definition at line 96 of file fbxobject.h.

◆ FBX_TYPE

#define FBX_TYPE (   class)    ((const class*)0)

Convert the class type parameter into a C class parameter for other function inputs.

Usage example:

//Assuming MyCamera is a valid FbxCamera object
bool AreCamerasObject = MyCamera->Is<FbxObject>(); //Should return true :)
Examples:
ExportScene03/main.cxx.

Definition at line 1471 of file fbxobject.h.

◆ FbxForEach

#define FbxForEach (   Iterator,
  Object 
)    for((Object)=(Iterator).GetFirst();(Object)!=0;(Object)=(Iterator).GetNext())

Macro used to iterate over source or destination objects that connect to property (FbxProperty) or object (FbxObject).

Definition at line 1496 of file fbxobject.h.

◆ FbxForEachReverse

#define FbxForEachReverse (   Iterator,
  Object 
)    for(Object=(Iterator).GetLast();(Object)!=0;Object=(Iterator).GetPrevious())

Macro used to reversely iterate over source or destination objects that connect to property (FbxProperty) or object (FbxObject)

Definition at line 1499 of file fbxobject.h.

Function Documentation

◆ FbxCast() [1/2]

T* FbxCast ( FbxObject pObject)
inline

Safe casting of FBX SDK objects into other FBX SDK class types.

This cast will perform the complete test to make sure the object inherits from the requested class type. This is the equivalent of a dynamic_cast but much faster.

Parameters
pObjectThe object to try to cast into T type.
Returns
A non-null pointer if the cast was successful.

Definition at line 1479 of file fbxobject.h.

1480 {
1481  return pObject && pObject->Is<T>() ? (T*)pObject : 0;
1482 }
bool Is() const
Templated test if this class is a hierarchical children of the specified class type.
Definition: fbxobject.h:167

◆ FbxCast() [2/2]

const T* FbxCast ( const FbxObject pObject)
inline

Safe const casting of FBX SDK objects into other FBX SDK class types.

This cast will perform the complete test to make sure the object inherits from the requested class type. This is the equivalent of a dynamic_cast but much faster.

Parameters
pObjectThe object to try to cast into T type.
Returns
A non-null pointer if the cast was successful.

Definition at line 1490 of file fbxobject.h.

1491 {
1492  return pObject && pObject->Is<T>() ? (const T*)pObject : 0;
1493 }
bool Is() const
Templated test if this class is a hierarchical children of the specified class type.
Definition: fbxobject.h:167

Go to the source code of this file.