Public Member Functions | Public Attributes

SourceElementContentAccessor< TYPE > Struct Template Reference

Search for all occurrences

Detailed Description

template<typename TYPE>
struct SourceElementContentAccessor< TYPE >

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

Definition at line 124 of file fbxcolladaelement.h.

#include <fbxcolladaelement.h>

Inheritance diagram for SourceElementContentAccessor< TYPE >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  SourceElementContentAccessor (xmlNode *pSourceElement)

Public Attributes

int  mCount
int  mStride
int  mOffset

Constructor & Destructor Documentation

SourceElementContentAccessor ( xmlNode *  pSourceElement ) [inline]

Definition at line 126 of file fbxcolladaelement.h.

        : mCount(0), mStride(1), mOffset(0)
    {
        bool lReadCount = true;
        xmlNode* lTechniqueElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_TECHNIQUE_COMMON_ELEMENT);
        if (lTechniqueElement)
        {
            xmlNode* lAccessorElement = DAE_FindChildElementByTag(lTechniqueElement, COLLADA_ACCESSOR_STRUCTURE);
            FBX_ASSERT(lAccessorElement);
            if (!lAccessorElement)
                return;

            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_COUNT_PROPERTY, mCount);
            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_STRIDE_PROPERTY, mStride);
            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_OFFSET_PROPERTY, mOffset);
            lReadCount = false;
        }

        xmlNode * lDataArrayElement = DAE_FindChildElementByTag(pSourceElement,
            TypeToArrayTag<TYPE>());
        // Some COLLADA exporters use IDREF_array instead of Name_array
        if (!lDataArrayElement && TypeToArrayTag<TYPE>() == COLLADA_NAME_ARRAY_STRUCTURE)
            lDataArrayElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_IDREF_ARRAY_STRUCTURE);
        FBX_ASSERT(lDataArrayElement);

        if (lDataArrayElement && lReadCount)
            DAE_GetElementAttributeValue(lDataArrayElement, COLLADA_COUNT_PROPERTY, mCount);

        mContent = xmlNodeGetContent(lDataArrayElement);
        mPointer = (const char *)mContent;
    }

Member Data Documentation

int mCount

Definition at line 158 of file fbxcolladaelement.h.

Definition at line 159 of file fbxcolladaelement.h.

Definition at line 160 of file fbxcolladaelement.h.


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