FBX C++ API Reference
|
#include <fbxsdk.h>
#include <fbxsdk/fileio/collada/fbxcolladatokens.h>
#include <fbxsdk/fileio/collada/fbxcolladaiostream.h>
#include <fbxsdk/scene/fbxscene.h>
#include <fbxsdk/utils/fbxrenamingstrategybase.h>
#include <fbxsdk/utils/fbxnamehandler.h>
#include <components/libxml2-2.7.8/include/libxml/globals.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
#include <fbxsdk/fbxsdk_nsend.h>
Classes | |
class | FbxRenamingStrategyCollada |
class | XmlNodeDeletionPolicy |
struct | ColladaLayerTraits |
Macros | |
#define | INT_MAX 0x7FFFFFFF |
#define | CENTIMETERS_TO_INCHES 2.54f |
#define | RADIANS_TO_DEGREES 57.295799f |
#define | COLLADA_ID_PROPERTY_NAME "COLLADA_ID" |
Typedefs | |
typedef FbxAutoPtr< xmlNode, XmlNodeDeletionPolicy > | XmlNodePtr |
typedef FbxMap< FbxString, xmlNode *> | SourceElementMapType |
typedef FbxMap< FbxString, xmlNode *> | SkinMapType |
typedef FbxArray< xmlNode * > | CNodeList |
Enumerations | |
enum | DAE_Flow { kCOLLADAFlowIn, kCOLLADAFlowOut, kCOLLADAFlowInOut } |
Functions | |
void | DAE_AddNotificationError (const FbxManager *pSdkManger, const FbxString &pErrorMessage) |
Emit error message. More... | |
void | DAE_AddNotificationWarning (const FbxManager *pSdkManger, const FbxString &pWarningMessage) |
Emit warning message. More... | |
void | DAE_ExportArray (xmlNode *parentXmlNode, const char *id, FbxArray< FbxVector4 > &arr) |
void | DAE_ExportArray (xmlNode *parentXmlNode, const char *id, FbxArray< FbxVector2 > &arr) |
void | DAE_ExportArray (xmlNode *parentXmlNode, const char *id, FbxArray< FbxColor > &arr) |
void | DAE_ExportArray (xmlNode *parentXmlNode, const char *id, FbxArray< double > &arr) |
void | DAE_ExportArray (xmlNode *parentXmlNode, const char *id, FbxStringList &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxStringList &accessorParams, FbxArray< double > &arr, bool isCommonProfile=true) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxArray< FbxVector4 > &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxArray< FbxVector2 > &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxArray< FbxColor > &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxArray< FbxAMatrix > &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxArray< FbxMatrix > &arr) |
xmlNode * | DAE_ExportSource14 (xmlNode *parentXmlNode, const char *id, FbxStringList &arr, const char *type, bool isCommonProfile=true) |
void | DAE_ExportSourceArray (xmlNode *sourceNode, const char *id, FbxArray< FbxColor > &arr) |
void | DAE_ExportSourceArray14 (xmlNode *sourceNode, const char *id, FbxArray< FbxColor > &arr) |
xmlNode * | DAE_ExportAccessor (xmlNode *parentXmlNode, const char *id, const char *arrayRef, int count, int stride, const char *name, const char *type) |
xmlNode * | DAE_ExportAccessor14 (xmlNode *parentXmlNode, const char *id, const char *arrayRef, int count, int stride, const char *name, const char *type) |
void | DAE_AddXYZAccessor (xmlNode *parentXmlNode, const char *profile, const char *arrayName, const char *arrayRef, int count) |
void | DAE_AddSTAccessor (xmlNode *parentXmlNode, const char *profile, const char *arrayName, const char *arrayRef, int count) |
void | DAE_AddFlow (xmlNode *node, DAE_Flow flow) |
void | DAE_AddXYZAccessor14 (xmlNode *parentXmlNode, const char *profile, const char *arrayName, const char *arrayRef, int count) |
void | DAE_AddSTAccessor14 (xmlNode *parentXmlNode, const char *profile, const char *arrayName, const char *arrayRef, int count) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const FbxColor &color, DAE_Flow flow) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const FbxVector4 &vector, DAE_Flow flow) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, double value, DAE_Flow flow) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, bool value, DAE_Flow flow) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const char *type, const char *value, DAE_Flow flow) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const FbxDouble3 &color) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const FbxColor &color) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const FbxVector4 &vector) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, double value) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, bool value) |
xmlNode * | DAE_AddParameter (xmlNode *parentXmlNode, const char *name, const char *type, const char *value) |
xmlNode * | DAE_AddTechnique (xmlNode *parentXmlNode, const char *technique) |
void | DAE_AddInput (xmlNode *parentXmlNode, const char *semantic, const char *source, int idx=-1) |
void | DAE_AddInput14 (xmlNode *parentXmlNode, const char *semantic, const char *source, int offset=-1, int set=-1) |
FbxString | matrixToString (const FbxAMatrix &mx) |
void | findChildrenByType (xmlNode *pParentElement, const FbxSet< FbxString > &pTypes, CNodeList &pChildrenElements) |
Find children elements whose type is included in a list of type. More... | |
void | findChildrenByType (xmlNode *pParentElement, const char *pType, CNodeList &pChildrenElements) |
Find children elements of a specific type. More... | |
xmlNode * | getSourceAccessor (xmlNode *sourceNode) |
xmlNode * | getTechniqueNode (xmlNode *parent, const char *profile) |
double | inchesToCentimeters (double val) |
double | centimetersToInches (double val) |
double | degreesToRadians (double val) |
double | radiansToDegrees (double val) |
xmlNode * | DAE_FindChildElementByAttribute (xmlNode *pParentElement, const char *pAttributeName, const char *pAttributeValue, const char *pDefaultAttributeValue="") |
Find a child element with a given attribute value. More... | |
xmlNode * | DAE_FindChildElementByTag (xmlNode *pParentElement, const char *pTag, xmlNode *pFindFrom=((void *) 0)) |
Find a child element with a given tag. More... | |
template<typename TYPE > | |
void | DAE_GetElementContent (xmlNode *pElement, TYPE &pData) |
Get the content of a XML element. More... | |
bool | DAE_CheckCompatibility (xmlNode *pNodeElement) |
Check whether this node is compatible to FBX transform structure. More... | |
void | DAE_GetElementTag (xmlNode *pElement, FbxString &pTag) |
Get the tag of the specific element. More... | |
const FbxString | DAE_GetElementAttributeValue (xmlNode *pElement, const char *pAttributeName) |
Get the value of an attribute of an element. More... | |
template<typename TYPE > | |
bool | DAE_GetElementAttributeValue (xmlNode *pElement, const char *pAttributeName, TYPE &pData) |
Get the value of an attribute of an element. More... | |
template<> | |
bool | DAE_GetElementAttributeValue (xmlNode *pElement, const char *pAttributeName, FbxString &pData) |
bool | DAE_CompareAttributeValue (xmlNode *pElement, const char *pAttributeName, const char *pValue) |
Compare the value of specific attribute of specific element with given value. More... | |
const FbxString | DAE_GetIDFromUrlAttribute (xmlNode *pElement, FbxString &pExternalRef) |
Get the ID of another element from the url attribute of the given element. More... | |
const FbxString | DAE_GetIDFromSourceAttribute (xmlNode *pElement) |
Get the ID of another element from the source attribute of the given element. More... | |
const FbxString | DAE_GetIDFromTargetAttribute (xmlNode *pElement) |
Get the ID of another element from the target attribute of the given element. More... | |
void | DAE_SetName (FbxObject *pObject, const FbxString &pName, const FbxString &pID) |
Set the name of the object with a given name. More... | |
xmlNode * | DAE_GetSourceWithSemantic (xmlNode *pConsumerElement, const char *pSemantic, const SourceElementMapType &pSourceElements) |
Get the COLLADA source element with a semantic meaning and a consumer element; The COLLADA input element declares the input connections to a data source that a consumer requires. More... | |
template<typename T > | |
xmlNode * | DAE_AddChildElement (xmlNode *pParentElement, const char *pTag, const T &pContent) |
Add a child element with specific content. More... | |
xmlNode * | DAE_AddChildElement (xmlNode *pParentElement, const char *pTag) |
xmlNode * | DAE_NewElement (const char *pTag) |
template<typename T > | |
xmlAttr * | DAE_AddAttribute (xmlNode *pElement, const FbxString &pAttributeName, const T &pAttributeValue) |
Add an attribute for a element. More... | |
const FbxSystemUnit | DAE_ImportUnit (xmlNode *pUnitElement) |
Import a COLLADA unit element into a FBX system unit. More... | |
void | IncreaseLclTranslationAnimation (FbxNode *pNode, FbxDouble3 &pOffset) |
If the specific node has animation on its local translation, increase every key by the offset. More... | |
void | RecursiveSearchElement (xmlNode *pBaseElement, const char *pTag, FbxArray< xmlNode *> &pResult) |
Search the elements with given tag, push the found results to the end of the given array. More... | |
Variables | |
const int | MATRIX_STRIDE = 16 |
const int | VECTOR_STRIDE = 3 |
#define INT_MAX 0x7FFFFFFF |
Definition at line 43 of file fbxcolladautils.h.
#define CENTIMETERS_TO_INCHES 2.54f |
Definition at line 47 of file fbxcolladautils.h.
#define RADIANS_TO_DEGREES 57.295799f |
Definition at line 51 of file fbxcolladautils.h.
#define COLLADA_ID_PROPERTY_NAME "COLLADA_ID" |
Definition at line 59 of file fbxcolladautils.h.
typedef FbxAutoPtr<xmlNode, XmlNodeDeletionPolicy> XmlNodePtr |
Definition at line 74 of file fbxcolladautils.h.
typedef FbxMap< FbxString, xmlNode* > SourceElementMapType |
Definition at line 75 of file fbxcolladautils.h.
typedef FbxMap< FbxString, xmlNode* > SkinMapType |
Definition at line 76 of file fbxcolladautils.h.
Definition at line 159 of file fbxcolladautils.h.
enum DAE_Flow |
Enumerator | |
---|---|
kCOLLADAFlowIn | |
kCOLLADAFlowOut | |
kCOLLADAFlowInOut |
Definition at line 54 of file fbxcolladautils.h.
void DAE_AddNotificationError | ( | const FbxManager * | pSdkManger, |
const FbxString & | pErrorMessage | ||
) |
Emit error message.
pSdkManger | The SDK manager used to access user notification object. |
pErrorMessage | The message to be presented. |
void DAE_AddNotificationWarning | ( | const FbxManager * | pSdkManger, |
const FbxString & | pWarningMessage | ||
) |
Emit warning message.
pSdkManger | The SDK manager used to access user notification object. |
pWarningMessage | The message to be presented. |
void DAE_ExportArray | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxVector4 > & | arr | ||
) |
void DAE_ExportArray | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxVector2 > & | arr | ||
) |
void DAE_ExportArray | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< double > & | arr | ||
) |
void DAE_ExportArray | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxStringList & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxStringList & | accessorParams, | ||
FbxArray< double > & | arr, | ||
bool | isCommonProfile = true |
||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxVector4 > & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxVector2 > & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxColor > & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxAMatrix > & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxArray< FbxMatrix > & | arr | ||
) |
xmlNode* DAE_ExportSource14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
FbxStringList & | arr, | ||
const char * | type, | ||
bool | isCommonProfile = true |
||
) |
xmlNode* DAE_ExportAccessor | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
const char * | arrayRef, | ||
int | count, | ||
int | stride, | ||
const char * | name, | ||
const char * | type | ||
) |
xmlNode* DAE_ExportAccessor14 | ( | xmlNode * | parentXmlNode, |
const char * | id, | ||
const char * | arrayRef, | ||
int | count, | ||
int | stride, | ||
const char * | name, | ||
const char * | type | ||
) |
void DAE_AddXYZAccessor | ( | xmlNode * | parentXmlNode, |
const char * | profile, | ||
const char * | arrayName, | ||
const char * | arrayRef, | ||
int | count | ||
) |
void DAE_AddSTAccessor | ( | xmlNode * | parentXmlNode, |
const char * | profile, | ||
const char * | arrayName, | ||
const char * | arrayRef, | ||
int | count | ||
) |
void DAE_AddFlow | ( | xmlNode * | node, |
DAE_Flow | flow | ||
) |
void DAE_AddXYZAccessor14 | ( | xmlNode * | parentXmlNode, |
const char * | profile, | ||
const char * | arrayName, | ||
const char * | arrayRef, | ||
int | count | ||
) |
void DAE_AddSTAccessor14 | ( | xmlNode * | parentXmlNode, |
const char * | profile, | ||
const char * | arrayName, | ||
const char * | arrayRef, | ||
int | count | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const FbxColor & | color, | ||
DAE_Flow | flow | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const FbxVector4 & | vector, | ||
DAE_Flow | flow | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
double | value, | ||
DAE_Flow | flow | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
bool | value, | ||
DAE_Flow | flow | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const char * | type, | ||
const char * | value, | ||
DAE_Flow | flow | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const FbxDouble3 & | color | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const FbxColor & | color | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const FbxVector4 & | vector | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
double | value | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
bool | value | ||
) |
xmlNode* DAE_AddParameter | ( | xmlNode * | parentXmlNode, |
const char * | name, | ||
const char * | type, | ||
const char * | value | ||
) |
xmlNode* DAE_AddTechnique | ( | xmlNode * | parentXmlNode, |
const char * | technique | ||
) |
void DAE_AddInput | ( | xmlNode * | parentXmlNode, |
const char * | semantic, | ||
const char * | source, | ||
int | idx = -1 |
||
) |
void DAE_AddInput14 | ( | xmlNode * | parentXmlNode, |
const char * | semantic, | ||
const char * | source, | ||
int | offset = -1 , |
||
int | set = -1 |
||
) |
FbxString matrixToString | ( | const FbxAMatrix & | mx | ) |
void findChildrenByType | ( | xmlNode * | pParentElement, |
const FbxSet< FbxString > & | pTypes, | ||
CNodeList & | pChildrenElements | ||
) |
Find children elements whose type is included in a list of type.
pParentElement | The parent element. |
pTypes | The list of types. |
pChildrenElements | The found children elements. |
void findChildrenByType | ( | xmlNode * | pParentElement, |
const char * | pType, | ||
CNodeList & | pChildrenElements | ||
) |
Find children elements of a specific type.
pParentElement | The parent element. |
pType | The type. |
pChildrenElements | The found children elements. |
xmlNode* getSourceAccessor | ( | xmlNode * | sourceNode | ) |
xmlNode* getTechniqueNode | ( | xmlNode * | parent, |
const char * | profile | ||
) |
|
inline |
Definition at line 179 of file fbxcolladautils.h.
|
inline |
Definition at line 180 of file fbxcolladautils.h.
|
inline |
Definition at line 182 of file fbxcolladautils.h.
|
inline |
Definition at line 183 of file fbxcolladautils.h.
xmlNode* DAE_FindChildElementByAttribute | ( | xmlNode * | pParentElement, |
const char * | pAttributeName, | ||
const char * | pAttributeValue, | ||
const char * | pDefaultAttributeValue = "" |
||
) |
Find a child element with a given attribute value.
pParentElement | The parent element. |
pAttributeName | The name of the attribute. |
pAttributeValue | The value of the attribute. |
pDefaultAttributeValue | The default value of the attribute used when the attribute is not found explicitly. |
xmlNode* DAE_FindChildElementByTag | ( | xmlNode * | pParentElement, |
const char * | pTag, | ||
xmlNode * | pFindFrom = ((void *) 0) |
||
) |
Find a child element with a given tag.
pParentElement | The parent element. |
pTag | The value of the tag. |
pFindFrom | Find from the next child after pFindFrom if pFindFrom is not NULL. |
void DAE_GetElementContent | ( | xmlNode * | pElement, |
TYPE & | pData | ||
) |
Get the content of a XML element.
pElement | The element whose content is returned. |
pData | The returned data. |
Definition at line 208 of file fbxcolladautils.h.
bool DAE_CheckCompatibility | ( | xmlNode * | pNodeElement | ) |
Check whether this node is compatible to FBX transform structure.
pNodeElement | The specific node element. |
void DAE_GetElementTag | ( | xmlNode * | pElement, |
FbxString & | pTag | ||
) |
Get the tag of the specific element.
pElement | The specific element. |
pTag | Return the tag of the element. |
const FbxString DAE_GetElementAttributeValue | ( | xmlNode * | pElement, |
const char * | pAttributeName | ||
) |
Get the value of an attribute of an element.
pElement | The specific XML element. |
pAttributeName | The name of the specific attribute. |
bool DAE_GetElementAttributeValue | ( | xmlNode * | pElement, |
const char * | pAttributeName, | ||
TYPE & | pData | ||
) |
Get the value of an attribute of an element.
pElement | The specific XML element. |
pAttributeName | The name of the specific attribute. |
pData | The returned data. |
true
on success and false
if no attribute has the given name. Definition at line 243 of file fbxcolladautils.h.
|
inline |
Definition at line 260 of file fbxcolladautils.h.
bool DAE_CompareAttributeValue | ( | xmlNode * | pElement, |
const char * | pAttributeName, | ||
const char * | pValue | ||
) |
Compare the value of specific attribute of specific element with given value.
pElement | The specific element. |
pAttributeName | The name of the specific attribute. |
pValue | The value to compare with. |
Get the ID of another element from the url attribute of the given element.
pElement | The specific XML element in which the ID is looked for. |
pExternalRef | The external reference part of the url (before the #) |
const FbxString DAE_GetIDFromSourceAttribute | ( | xmlNode * | pElement | ) |
Get the ID of another element from the source attribute of the given element.
pElement | The specific XML element in which the ID is looked for. |
const FbxString DAE_GetIDFromTargetAttribute | ( | xmlNode * | pElement | ) |
Get the ID of another element from the target attribute of the given element.
Note that in target attribute, the URI identifier may or may not preceded with the pound sign.
pElement | The specific XML element in which the ID is looked for. |
Set the name of the object with a given name.
If the name is empty, use the ID.
pObject | The object whose name is to be set. |
pName | The name string. |
pID | The ID string. |
xmlNode* DAE_GetSourceWithSemantic | ( | xmlNode * | pConsumerElement, |
const char * | pSemantic, | ||
const SourceElementMapType & | pSourceElements | ||
) |
Get the COLLADA source element with a semantic meaning and a consumer element; The COLLADA input element declares the input connections to a data source that a consumer requires.
A data source is a container of raw data that lacks semantic meaning so that the data can be reused within the document. To use the data, a consumer declares a connection to it with the desired semantic information.
pConsumerElement | A consumer element, like sampler element in animation system or joints element in controller system. |
pSemantic | A semantic meaning, like "INPUT", "OUTPUT" or "INTERPOLATION" in animation system. |
pSourceElements | The container of raw data. |
NULL
is failed. xmlNode* DAE_AddChildElement | ( | xmlNode * | pParentElement, |
const char * | pTag, | ||
const T & | pContent | ||
) |
Add a child element with specific content.
pParentElement | The parent element. |
pTag | The tag string of the new child element. |
pContent | The content of the child element. |
Definition at line 332 of file fbxcolladautils.h.
|
inline |
Definition at line 341 of file fbxcolladautils.h.
|
inline |
Definition at line 347 of file fbxcolladautils.h.
xmlAttr* DAE_AddAttribute | ( | xmlNode * | pElement, |
const FbxString & | pAttributeName, | ||
const T & | pAttributeValue | ||
) |
Add an attribute for a element.
pElement | The element where the attribute is added. |
pAttributeName | The name of the attribute. |
pAttributeValue | The value of the attribute. |
Definition at line 359 of file fbxcolladautils.h.
const FbxSystemUnit DAE_ImportUnit | ( | xmlNode * | pUnitElement | ) |
Import a COLLADA unit element into a FBX system unit.
pUnitElement | The COLLADA unit element. |
void IncreaseLclTranslationAnimation | ( | FbxNode * | pNode, |
FbxDouble3 & | pOffset | ||
) |
If the specific node has animation on its local translation, increase every key by the offset.
pNode | The specific node. |
pOffset | The specific offset value. |
void RecursiveSearchElement | ( | xmlNode * | pBaseElement, |
const char * | pTag, | ||
FbxArray< xmlNode *> & | pResult | ||
) |
Search the elements with given tag, push the found results to the end of the given array.
pBaseElement | Search from this element. |
pTag | The given tag. |
pResult | The array to return the found results. |
const int MATRIX_STRIDE = 16 |
Definition at line 56 of file fbxcolladautils.h.
const int VECTOR_STRIDE = 3 |
Definition at line 57 of file fbxcolladautils.h.