FBX C++ API Reference
fbxcolladautils.h File Reference

Go to the source code of this file.

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, XmlNodeDeletionPolicyXmlNodePtr
 
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
 

Macro Definition Documentation

#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 Documentation

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.

typedef FbxArray<xmlNode*> CNodeList

Definition at line 159 of file fbxcolladautils.h.

Enumeration Type Documentation

enum DAE_Flow
Enumerator
kCOLLADAFlowIn 
kCOLLADAFlowOut 
kCOLLADAFlowInOut 

Definition at line 54 of file fbxcolladautils.h.

Function Documentation

void DAE_AddNotificationError ( const FbxManager pSdkManger,
const FbxString pErrorMessage 
)

Emit error message.

Parameters
pSdkMangerThe SDK manager used to access user notification object.
pErrorMessageThe message to be presented.
void DAE_AddNotificationWarning ( const FbxManager pSdkManger,
const FbxString pWarningMessage 
)

Emit warning message.

Parameters
pSdkMangerThe SDK manager used to access user notification object.
pWarningMessageThe 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< 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.

Parameters
pParentElementThe parent element.
pTypesThe list of types.
pChildrenElementsThe found children elements.
void findChildrenByType ( xmlNode *  pParentElement,
const char *  pType,
CNodeList pChildrenElements 
)

Find children elements of a specific type.

Parameters
pParentElementThe parent element.
pTypeThe type.
pChildrenElementsThe found children elements.
xmlNode* getSourceAccessor ( xmlNode *  sourceNode)
xmlNode* getTechniqueNode ( xmlNode *  parent,
const char *  profile 
)
double inchesToCentimeters ( double  val)
inline

Definition at line 179 of file fbxcolladautils.h.

179 { return FbxFloor(val / CENTIMETERS_TO_INCHES * 100000) / 100000; }
float FbxFloor(const float x)
Definition: fbxmath.h:119
#define CENTIMETERS_TO_INCHES
double centimetersToInches ( double  val)
inline

Definition at line 180 of file fbxcolladautils.h.

180 { return FbxFloor(val * CENTIMETERS_TO_INCHES * 100000) / 100000; }
float FbxFloor(const float x)
Definition: fbxmath.h:119
#define CENTIMETERS_TO_INCHES
double degreesToRadians ( double  val)
inline

Definition at line 182 of file fbxcolladautils.h.

182 { return FbxFloor(val / RADIANS_TO_DEGREES * 100000) / 100000; }
float FbxFloor(const float x)
Definition: fbxmath.h:119
#define RADIANS_TO_DEGREES
double radiansToDegrees ( double  val)
inline

Definition at line 183 of file fbxcolladautils.h.

183 { return FbxFloor(val * RADIANS_TO_DEGREES * 100000) / 100000; }
float FbxFloor(const float x)
Definition: fbxmath.h:119
#define RADIANS_TO_DEGREES
xmlNode* DAE_FindChildElementByAttribute ( xmlNode *  pParentElement,
const char *  pAttributeName,
const char *  pAttributeValue,
const char *  pDefaultAttributeValue = "" 
)

Find a child element with a given attribute value.

Parameters
pParentElementThe parent element.
pAttributeNameThe name of the attribute.
pAttributeValueThe value of the attribute.
pDefaultAttributeValueThe default value of the attribute used when the attribute is not found explicitly.
Returns
Return NULL if no child element has the given attribute value.
xmlNode* DAE_FindChildElementByTag ( xmlNode *  pParentElement,
const char *  pTag,
xmlNode *  pFindFrom = ((void *) 0) 
)

Find a child element with a given tag.

Parameters
pParentElementThe parent element.
pTagThe value of the tag.
pFindFromFind from the next child after pFindFrom if pFindFrom is not NULL.
Returns
Return NULL if no child element has the given tag.
void DAE_GetElementContent ( xmlNode *  pElement,
TYPE &  pData 
)

Get the content of a XML element.

Parameters
pElementThe element whose content is returned.
pDataThe returned data.

Definition at line 208 of file fbxcolladautils.h.

209 {
210  if (pElement != NULL)
211  {
212  xmlChar* lContent = xmlNodeGetContent(pElement);
213  if (lContent)
214  {
215  FromString(&pData, (const char *)lContent);
216  xmlFree(lContent);
217  }
218  }
219 }
bool FromString(T *pDest, const char *pSourceBegin, const char **pSourceEnd=((void *) 0))
Convert part of the source string into destination type.
#define NULL
Definition: fbxarch.h:213
bool DAE_CheckCompatibility ( xmlNode *  pNodeElement)

Check whether this node is compatible to FBX transform structure.

Parameters
pNodeElementThe specific node element.
Returns
Return true if it is compatible.
void DAE_GetElementTag ( xmlNode *  pElement,
FbxString pTag 
)

Get the tag of the specific element.

Parameters
pElementThe specific element.
pTagReturn the tag of the element.
const FbxString DAE_GetElementAttributeValue ( xmlNode *  pElement,
const char *  pAttributeName 
)

Get the value of an attribute of an element.

Parameters
pElementThe specific XML element.
pAttributeNameThe name of the specific attribute.
Returns
The value of the attribute in the form of a string. If the attribute is not available, an empty string is returned.
bool DAE_GetElementAttributeValue ( xmlNode *  pElement,
const char *  pAttributeName,
TYPE &  pData 
)

Get the value of an attribute of an element.

Parameters
pElementThe specific XML element.
pAttributeNameThe name of the specific attribute.
pDataThe returned data.
Returns
Return true on success and false if no attribute has the given name.

Definition at line 247 of file fbxcolladautils.h.

248 {
249  if (!pElement || !pAttributeName)
250  return false;
251 
252  xmlChar* lPropertyValue = xmlGetProp(pElement, (const xmlChar *)pAttributeName);
253  if (lPropertyValue)
254  {
255  FromString(&pData, (const char *)lPropertyValue);
256  xmlFree(lPropertyValue);
257  return true;
258  }
259  return false;
260 }
bool FromString(T *pDest, const char *pSourceBegin, const char **pSourceEnd=((void *) 0))
Convert part of the source string into destination type.
bool DAE_GetElementAttributeValue ( xmlNode *  pElement,
const char *  pAttributeName,
FbxString pData 
)
inline

Definition at line 265 of file fbxcolladautils.h.

268 {
269  if (!pElement || !pAttributeName)
270  return false;
271 
272  xmlChar* lPropertyValue =xmlGetProp(pElement, (const xmlChar *)pAttributeName);
273  if (lPropertyValue)
274  {
275  pData = (const char *)lPropertyValue;
276  xmlFree(lPropertyValue);
277  return true;
278  }
279  return false;
280 }
bool DAE_CompareAttributeValue ( xmlNode *  pElement,
const char *  pAttributeName,
const char *  pValue 
)

Compare the value of specific attribute of specific element with given value.

Parameters
pElementThe specific element.
pAttributeNameThe name of the specific attribute.
pValueThe value to compare with.
Returns
Return true if values equal.
const FbxString DAE_GetIDFromUrlAttribute ( xmlNode *  pElement,
FbxString pExternalRef 
)

Get the ID of another element from the url attribute of the given element.

Parameters
pElementThe specific XML element in which the ID is looked for.
pExternalRefThe external reference part of the url (before the #)
Returns
The ID of another element if success, or an empty string if no url attributes are found.
const FbxString DAE_GetIDFromSourceAttribute ( xmlNode *  pElement)

Get the ID of another element from the source attribute of the given element.

Parameters
pElementThe specific XML element in which the ID is looked for.
Returns
The ID of another element if success, or an empty string if no source attributes are found.
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.

Parameters
pElementThe specific XML element in which the ID is looked for.
Returns
The ID of another element if success, or an empty string if no target attributes are found.
void DAE_SetName ( FbxObject pObject,
const FbxString pName,
const FbxString pID 
)

Set the name of the object with a given name.

If the name is empty, use the ID.

Parameters
pObjectThe object whose name is to be set.
pNameThe name string.
pIDThe 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.

Parameters
pConsumerElementA consumer element, like sampler element in animation system or joints element in controller system.
pSemanticA semantic meaning, like "INPUT", "OUTPUT" or "INTERPOLATION" in animation system.
pSourceElementsThe container of raw data.
Returns
Return NULL is failed.
xmlNode* DAE_AddChildElement ( xmlNode *  pParentElement,
const char *  pTag,
const T &  pContent 
)

Add a child element with specific content.

Parameters
pParentElementThe parent element.
pTagThe tag string of the new child element.
pContentThe content of the child element.
Returns
The created child element.

Definition at line 338 of file fbxcolladautils.h.

340 {
341  const FbxString lRepr = ToString(pContent);
342  return xmlNewChild(pParentElement, NULL, (xmlChar *)pTag,
343  (xmlChar *)lRepr.Buffer());
344 }
const FbxString ToString(const T &pValue)
#define NULL
Definition: fbxarch.h:213
Utility class to manipulate strings.
Definition: fbxstring.h:66
char * Buffer()
Non-const buffer access.
xmlNode* DAE_AddChildElement ( xmlNode *  pParentElement,
const char *  pTag 
)
inline

Definition at line 347 of file fbxcolladautils.h.

348 {
349  return DAE_AddChildElement(pParentElement, pTag, FbxString());
350 }
Utility class to manipulate strings.
Definition: fbxstring.h:66
xmlNode * DAE_AddChildElement(xmlNode *pParentElement, const char *pTag, const T &pContent)
Add a child element with specific content.
xmlNode* DAE_NewElement ( const char *  pTag)
inline

Definition at line 353 of file fbxcolladautils.h.

354 {
355  return xmlNewNode(NULL, reinterpret_cast<xmlChar*>(const_cast<char *>(pTag)));
356 }
#define NULL
Definition: fbxarch.h:213
xmlAttr* DAE_AddAttribute ( xmlNode *  pElement,
const FbxString pAttributeName,
const T &  pAttributeValue 
)

Add an attribute for a element.

Parameters
pElementThe element where the attribute is added.
pAttributeNameThe name of the attribute.
pAttributeValueThe value of the attribute.
Returns
The created attribute.

Definition at line 365 of file fbxcolladautils.h.

367 {
368  const FbxString lRepr = ToString(pAttributeValue);
369  return xmlNewProp(pElement, (xmlChar *)pAttributeName.Buffer(),
370  (xmlChar *)lRepr.Buffer());
371 }
const FbxString ToString(const T &pValue)
Utility class to manipulate strings.
Definition: fbxstring.h:66
char * Buffer()
Non-const buffer access.
const FbxSystemUnit DAE_ImportUnit ( xmlNode *  pUnitElement)

Import a COLLADA unit element into a FBX system unit.

Parameters
pUnitElementThe COLLADA unit element.
Returns
The created FBX system unit.
void IncreaseLclTranslationAnimation ( FbxNode pNode,
FbxDouble3 pOffset 
)

If the specific node has animation on its local translation, increase every key by the offset.

Parameters
pNodeThe specific node.
pOffsetThe 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.

Parameters
pBaseElementSearch from this element.
pTagThe given tag.
pResultThe array to return the found results.

Variable Documentation

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.