fbxsdk/fileio/collada/fbxcolladaelement.h File Reference
Convert from ID to URL, just add a prefix "#".
- Parameters
-
- Returns
- Return the URL string.
Definition at line 195 of file fbxcolladaelement.h.
Utility class to manipulate strings.
xmlNode* AddSourceElement |
( |
xmlNode * |
pParentElement, |
|
|
const char * |
pID, |
|
|
const T * |
pData, |
|
|
int |
pCount, |
|
|
int |
pStride = 1 |
|
) |
| |
Convert the array data to a source element under specific parent element.
- Parameters
-
pParentElement | The parent element. |
pID | The ID of the new source element. |
pData | The array data. |
pCount | The length of the array. |
pStride | The stride of each unit in the array. For example, when you export an array of FbxDouble3 of size 10, you convert it to a double array of size 30 with a stride 3 and call this method. |
- Returns
- The new source element.
Definition at line 211 of file fbxcolladaelement.h.
214 FBX_ASSERT(pParentElement && pData);
215 if (!pParentElement || !pData)
222 const int lDataCount = pCount * pStride;
223 for (
int lIndex = 0; lIndex < lDataCount; ++lIndex)
225 lContent +=
ToString(pData[lIndex]);
226 if (lIndex != lDataCount - 1)
230 xmlNode * lArrayElement =
DAE_AddChildElement(lSourceElement, TypeToArrayTag<T>(), lContent);
242 for (
int lStrideIndex = 0; lStrideIndex < pStride; ++lStrideIndex)
248 return lSourceElement;
#define COLLADA_ACCESSOR_STRUCTURE
const FbxString URL(const FbxString &pID)
Convert from ID to URL, just add a prefix "#".
const FbxString ToString(const T &pValue)
#define COLLADA_COUNT_PROPERTY
#define COLLADA_PARAMETER_STRUCTURE
#define COLLADA_STRIDE_PROPERTY
Utility class to manipulate strings.
#define COLLADA_SOURCE_STRUCTURE
#define COLLADA_ID_PROPERTY
xmlNode * DAE_AddChildElement(xmlNode *pParentElement, const char *pTag, const T &pContent)
Add a child element with specific content.
#define COLLADA_TYPE_PROPERTY
#define COLLADA_SOURCE_PROPERTY
#define COLLADA_TECHNIQUE_COMMON_ELEMENT
xmlAttr * DAE_AddAttribute(xmlNode *pElement, const FbxString &pAttributeName, const T &pAttributeValue)
Add an attribute for a element.
Populate the layer element with direct array and return index array for later use.
- Parameters
-
pLayerElement | The layer element to be populated. |
pSourceElement | The source element containing the direct array data. |
pSize | The count of double data of direct array element. |
- Returns
- Return the index array of the layer element.
Definition at line 257 of file fbxcolladaelement.h.
264 lLayerElement->
GetDirectArray().SetCount(lSourceElementAccessor.mCount);
266 TYPE * lArray =
NULL;
268 lSourceElementAccessor.GetArray((
double *)lArray, 0, pSize,
269 lSourceElementAccessor.mStride, 0, pSize,
sizeof(TYPE)/
sizeof(
double), 1.0);
FbxLayerElementArrayTemplate< int > & GetIndexArray() const
Returns the index array of Layer Elements.
void SetReferenceMode(EReferenceMode pReferenceMode)
Sets the Reference Mode.
A struct for convenient access to the content of COLLADA source element.
FbxLayerElementArrayTemplate< Type > & GetDirectArray() const
Returns the direct array of Layer Elements.
void SetMappingMode(EMappingMode pMappingMode)
Sets the Mapping Mode.
This class complements the FbxLayerElement class.
Go to the source code of this file.