FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SourceElementContentAccessor< TYPE > Struct Template Reference

#include <fbxcolladaelement.h>

Class Description

template<typename TYPE>
struct SourceElementContentAccessor< TYPE >

A struct for convenient access to the content of COLLADA source element.

Definition at line 110 of file fbxcolladaelement.h.

+ Inheritance diagram for SourceElementContentAccessor< TYPE >:

Public Member Functions

 SourceElementContentAccessor (xmlNode *pSourceElement)
 
- Public Member Functions inherited from ElementContentAccessor
 ElementContentAccessor ()
 
 ElementContentAccessor (xmlNode *pElement)
 
virtual ~ElementContentAccessor ()
 
template<typename TYPE >
bool GetNext (TYPE *pData)
 
template<typename TYPE >
int GetArray (TYPE *pArray, int pArraySize, int pSourceUnitOffset=0, int pSourceUnitValidCount=1, int pSourceUnitSize=1, int pDestUnitOffset=0, int pDestUnitValidCount=1, int pDestUnitSize=1, TYPE pDefaultValue=TYPE())
 

Public Attributes

int mCount
 
int mStride
 
int mOffset
 
- Public Attributes inherited from ElementContentAccessor
xmlChar * mContent
 
const char * mPointer
 

Constructor & Destructor Documentation

◆ SourceElementContentAccessor()

SourceElementContentAccessor ( xmlNode *  pSourceElement)
inline

Definition at line 112 of file fbxcolladaelement.h.

113  : mCount(0), mStride(1), mOffset(0)
114  {
115  bool lReadCount = true;
116  xmlNode* lTechniqueElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_TECHNIQUE_COMMON_ELEMENT);
117  if (lTechniqueElement)
118  {
119  xmlNode* lAccessorElement = DAE_FindChildElementByTag(lTechniqueElement, COLLADA_ACCESSOR_STRUCTURE);
120  if (lAccessorElement)
121  {
125  }
126  lReadCount = false;
127  }
128 
129  xmlNode * lDataArrayElement = DAE_FindChildElementByTag(pSourceElement, TypeToArrayTag<TYPE>());
130  // Some COLLADA exporters use IDREF_array instead of Name_array
131  if (!lDataArrayElement && TypeToArrayTag<TYPE>() == COLLADA_NAME_ARRAY_STRUCTURE)
132  lDataArrayElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_IDREF_ARRAY_STRUCTURE);
133  FBX_ASSERT(lDataArrayElement);
134 
135  if (lDataArrayElement && lReadCount)
137 
138  mContent = xmlNodeGetContent(lDataArrayElement);
139  mPointer = (const char *)mContent;
140  }
#define COLLADA_ACCESSOR_STRUCTURE
#define COLLADA_COUNT_PROPERTY
#define COLLADA_STRIDE_PROPERTY
#define COLLADA_OFFSET_PROPERTY
#define COLLADA_IDREF_ARRAY_STRUCTURE
#define COLLADA_NAME_ARRAY_STRUCTURE
const FbxString DAE_GetElementAttributeValue(xmlNode *pElement, const char *pAttributeName)
Get the value of an attribute of an element.
#define COLLADA_TECHNIQUE_COMMON_ELEMENT
xmlNode * DAE_FindChildElementByTag(xmlNode *pParentElement, const char *pTag, xmlNode *pFindFrom=((void *) 0))
Find a child element with a given tag.

Member Data Documentation

◆ mCount

int mCount

Definition at line 142 of file fbxcolladaelement.h.

◆ mStride

int mStride

Definition at line 143 of file fbxcolladaelement.h.

◆ mOffset

int mOffset

Definition at line 144 of file fbxcolladaelement.h.


The documentation for this struct was generated from the following file: