13 #ifndef _FBXSDK_SCENE_GEOMETRY_LAYER_H_
14 #define _FBXSDK_SCENE_GEOMETRY_LAYER_H_
118 const static int sTypeTextureStartIndex = int(eTextureDiffuse);
119 const static int sTypeTextureEndIndex = int(eTypeCount) - 1;
120 const static int sTypeTextureCount = sTypeTextureEndIndex - sTypeTextureStartIndex + 1;
121 const static int sTypeNonTextureStartIndex = int(eNormal);
122 const static int sTypeNonTextureEndIndex = int(eVisibility);
123 const static int sTypeNonTextureCount = sTypeNonTextureEndIndex - sTypeNonTextureStartIndex + 1;
124 static const char*
const sTextureNames[];
125 static const char*
const sTextureUVNames[];
126 static const char*
const sNonTextureNames[];
128 static const char*
const sTextureChannelNames[];
207 return (mName == pOther.mName) &&
208 (mMappingMode == pOther.mMappingMode) &&
209 (mReferenceMode == pOther.mReferenceMode);
218 mMappingMode = pOther.mMappingMode;
219 mReferenceMode = pOther.mReferenceMode;
237 #ifndef DOXYGEN_SHOULD_SKIP_THIS
238 void SetType(
const FbxDataType* pType) { mType = pType; }
243 : mMappingMode(eNone)
244 , mReferenceMode(eDirect)
254 EMappingMode mMappingMode;
255 EReferenceMode mReferenceMode;
267 virtual int MemorySize()
const {
return 0; }
268 virtual bool ContentWriteTo(
FbxStream& pStream)
const;
269 virtual bool ContentReadFrom(
const FbxStream& pStream);
374 bool IsInUse()
const;
379 int ReadLock()
const;
384 int ReadUnlock()
const;
390 bool WriteLock()
const;
394 void WriteUnlock()
const;
400 bool ReadWriteLock()
const;
404 void ReadWriteUnlock()
const;
431 virtual void* GetLocked(ELockMode pLockMode,
EFbxType pDataType);
469 virtual void Release(
void** pDataPtr,
EFbxType pDataType);
492 template <
class T>
inline void Release(T** pDataPtr, T* dummy)
494 T*** voidPtr = &pDataPtr;
495 Release((
void**)*voidPtr,
FbxTypeOf(*dummy));
500 virtual size_t GetStride()
const;
508 int GetCount()
const;
513 void SetCount(
int pCount);
521 void Resize(
int pItemCount);
526 void AddMultiple(
int pItemCount);
533 int Add(
const void* pItem,
EFbxType pValueType);
542 int InsertAt(
int pIndex,
const void* pItem,
EFbxType pValueType);
550 void SetAt(
int pIndex,
const void* pItem,
EFbxType pValueType);
557 void SetLast(
const void* pItem,
EFbxType pValueType);
565 void RemoveAt(
int pIndex,
void** pItem,
EFbxType pValueType);
572 void RemoveLast(
void** pItem,
EFbxType pValueType);
579 bool RemoveIt(
void** pItem,
EFbxType pValueType);
588 bool GetAt(
int pIndex,
void** pItem,
EFbxType pValueType)
const;
595 bool GetFirst(
void** pItem,
EFbxType pValueType)
const;
602 bool GetLast(
void** pItem,
EFbxType pValueType)
const;
610 int Find(
const void* pItem,
EFbxType pValueType)
const;
619 int FindAfter(
int pAfterIndex,
const void* pItem,
EFbxType pValueType)
const;
628 int FindBefore(
int pBeforeIndex,
const void* pItem,
EFbxType pValueType)
const;
640 template <
class T>
inline int Add(T
const& pItem) {
return Add((
const void*)&pItem,
FbxTypeOf(pItem)); }
655 template <
class T>
inline void SetAt(
int pIndex, T
const& pItem) {
SetAt(pIndex, (
const void*)&pItem,
FbxTypeOf(pItem)); }
668 template <
class T>
inline void RemoveAt(
int pIndex, T* pItem)
670 T** voidPtr = &pItem;
671 RemoveAt(pIndex, (
void**)voidPtr,
FbxTypeOf(*pItem));
680 T** voidPtr = &pItem;
681 RemoveLast((
void**)voidPtr,
FbxTypeOf(*pItem));
690 T** voidPtr = &pItem;
691 return RemoveIt((
void**)voidPtr,
FbxTypeOf(*pItem));
700 template <
class T>
inline bool GetAt(
int pIndex, T* pItem)
const
702 T** voidPtr = &pItem;
703 return GetAt(pIndex, (
void**)voidPtr,
FbxTypeOf(*pItem));
710 template <
class T>
inline bool GetFirst(T* pItem)
const
712 T** voidPtr = &pItem;
713 return GetFirst((
void**)voidPtr,
FbxTypeOf(*pItem));
720 template <
class T>
inline bool GetLast(T* pItem)
const
722 T** voidPtr = &pItem;
723 return GetLast((
void**)voidPtr,
FbxTypeOf(*pItem));
731 template <
class T>
inline int Find(T
const& pItem)
const {
return Find((
const void*)&pItem,
FbxTypeOf(pItem)); }
739 template <
class T>
inline int FindAfter(
int pAfterIndex, T
const& pItem)
const {
return FindAfter(pAfterIndex, (
const void*)&pItem,
FbxTypeOf(pItem)); }
747 template <
class T>
inline int FindBefore(
int pBeforeIndex, T
const& pItem)
const {
return FindBefore(pBeforeIndex, (
const void*)&pItem,
FbxTypeOf(pItem)); }
766 for (
int i = 0; i < GetCount(); i++)
768 if (GetAt(i, (
void**)&srcPtr, mDataType))
779 void* GetReference(
int pIndex,
EFbxType pValueType);
780 void GetReferenceTo(
int pIndex,
void** pRef,
EFbxType pValueType);
787 void SetImplementation(
void* pImplementation);
789 virtual void ConvertDataType(
EFbxType pDataType,
void** pDataPtr,
size_t* pStride);
798 void* mImplementation;
801 bool mDirectAccessOn;
810 template <
typename T>
828 mArray.
Release((
void **) &mLockedData);
959 SetCount(pArrayTemplate.GetCount());
960 for (
int i = 0; i < pArrayTemplate.GetCount(); i++)
973 if (
this != &pArrayTemplate )
979 for (
int i = 0; i < pArrayTemplate.
GetCount(); i++)
1026 return *mDirectArray;
1036 return *mDirectArray;
1046 return *mIndexArray;
1056 return *mIndexArray;
1066 mDirectArray->Clear();
1069 mIndexArray->Clear();
1089 if( directArray.
GetCount() != mDirectArray->GetCount() ||
1090 !directArray.
ReadLock() || !mDirectArray->ReadLock() )
1095 if( ret && !mDirectArray->IsEqual(directArray) )
1099 mDirectArray->ReadUnlock();
1108 if( indexArray.
GetCount() != mIndexArray->GetCount() ||
1109 !indexArray.
ReadLock() || !mIndexArray->ReadLock() )
1114 if( ret && !mIndexArray->IsEqual(indexArray) )
1118 mIndexArray->ReadUnlock();
1133 FBX_ASSERT(mDirectArray !=
NULL);
1134 FBX_ASSERT(mIndexArray !=
NULL);
1140 *mDirectArray = directArray;
1147 *mIndexArray = indexArray;
1171 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1175 mDirectArray =
NULL;
1185 virtual void AllocateArrays()
1187 mDirectArray = FbxNew< FbxLayerElementArrayTemplate<Type> >(mType->GetType());
1188 mIndexArray = FbxNew< FbxLayerElementArrayTemplate<int> >(
FbxIntDT.
GetType());
1192 virtual int MemorySize()
const
1194 int size = FbxLayerElement::MemorySize();
1195 size += (mDirectArray->GetCount()*
sizeof(Type));
1196 size += (mIndexArray->GetCount()*
sizeof(int));
1204 virtual bool ContentWriteTo(
FbxStream& pStream)
const
1211 count = mDirectArray->GetCount();
1212 s = pStream.
Write(&count,
sizeof(
int));
1213 if (s !=
sizeof(
int))
return false;
1216 a = mDirectArray->GetLocked();
1217 FBX_ASSERT(a !=
NULL);
1218 v = count*
sizeof(Type);
1219 s = pStream.
Write(a, v);
1220 mDirectArray->Release(&a);
1221 if (s != v)
return false;
1225 count = mIndexArray->GetCount();
1226 s = pStream.
Write(&count,
sizeof(
int));
1227 if (s !=
sizeof(
int))
return false;
1230 a = mIndexArray->GetLocked();
1231 FBX_ASSERT(a !=
NULL);
1232 v = count*
sizeof(int);
1233 s = pStream.
Write(a, v);
1234 mIndexArray->Release(&a);
1235 if (s != v)
return false;
1238 return FbxLayerElement::ContentWriteTo(pStream);
1241 virtual bool ContentReadFrom(
const FbxStream& pStream)
1248 s = pStream.
Read(&count,
sizeof(
int));
1249 if (s !=
sizeof(
int))
return false;
1250 mDirectArray->Resize(count);
1253 a = mDirectArray->GetLocked();
1254 FBX_ASSERT(a !=
NULL);
1255 v = count*
sizeof(Type);
1256 s = pStream.
Read(a, v);
1257 mDirectArray->Release(&a);
1258 if (s != v)
return false;
1262 s = pStream.
Read(&count,
sizeof(
int));
1263 if (s !=
sizeof(
int))
return false;
1264 mIndexArray->Resize(count);
1267 a = mIndexArray->GetLocked();
1268 FBX_ASSERT(a !=
NULL);
1269 v = count*
sizeof(int);
1270 s = pStream.
Read(a, v);
1271 mIndexArray->Release(&a);
1272 if (s != v)
return false;
1274 return FbxLayerElement::ContentReadFrom(pStream);
1278 typedef Type ArrayElementType;
1287 #define FBXSDK_LAYER_ELEMENT_CREATE_DECLARE(classDesc) \
1288 FBXSDK_FRIEND_NEW(); \
1289 static Fbx##classDesc* Create(FbxLayerContainer* pOwner, const char* pName);
1414 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1415 virtual void AllocateArrays();
1417 virtual void SetInstance(
int pInstance ) { SetOwner( mOwner, pInstance ); }
1426 return ParentClass::GetDirectArray();
1431 return ParentClass::GetDirectArray();
1543 if (pStatus) *pStatus =
true;
1548 if( pStatus ) *pStatus =
false;
1549 FBX_ASSERT_NOW(
"Index out of bounds");
1563 if (pStatus) *pStatus =
true;
1568 if( pStatus ) *pStatus =
false;
1569 FBX_ASSERT_NOW(
"Index out of bounds");
1583 for(
int i = 0; i < mDataNames.GetCount(); ++i )
1585 if( *mDataNames[i] == lName )
1586 return GetDirectArrayVoid(i, pStatus);
1589 if (pStatus) *pStatus =
false;
1601 for(
int i = 0; i < mDataNames.GetCount(); ++i )
1603 if( *mDataNames[i] == lName )
1604 return GetDirectArrayVoid(i, pStatus);
1607 if (pStatus) *pStatus =
false;
1617 if( pIndex < 0 || pIndex >= mDataTypes.GetCount() )
1620 return mDataTypes[pIndex];
1631 for(
int i = 0; i < mDataNames.GetCount(); ++i )
1633 if( *mDataNames[i] == lName )
1634 return mDataTypes[i];
1646 if( pIndex >= 0 && pIndex < mDataNames.GetCount() )
1647 return mDataNames[pIndex]->Buffer();
1659 switch( mDataTypes[i].GetType() )
1661 case eFbxBool: FbxGetDirectArray<bool>(
this,i).Resize( pSize ) ;
break;
1662 case eFbxInt: FbxGetDirectArray<int>(
this,i).Resize( pSize ) ;
break;
1663 case eFbxFloat: FbxGetDirectArray<float>(
this,i).Resize( pSize ) ;
break;
1664 case eFbxDouble: FbxGetDirectArray<double>(
this,i).Resize( pSize );
break;
1669 FBX_ASSERT_NOW(
"unknown type" );
break;
1681 switch( mDataTypes[i].GetType() )
1683 case eFbxBool: FbxGetDirectArray<bool>(
this,i).RemoveAt( pIndex ) ;
break;
1684 case eFbxInt: FbxGetDirectArray<int>(
this,i).RemoveAt( pIndex ) ;
break;
1685 case eFbxFloat: FbxGetDirectArray<float>(
this,i).RemoveAt( pIndex ) ;
break;
1686 case eFbxDouble: FbxGetDirectArray<double>(
this,i).RemoveAt( pIndex );
break;
1691 FBX_ASSERT_NOW(
"unknown type" );
break;
1704 switch( mDataTypes[pIndex].GetType() )
1706 case eFbxBool:
return FbxGetDirectArray<bool>(
this,pIndex).GetCount();
1707 case eFbxInt:
return FbxGetDirectArray<int>(
this,pIndex).GetCount();
1708 case eFbxFloat:
return FbxGetDirectArray<float>(
this,pIndex).GetCount();
1709 case eFbxDouble:
return FbxGetDirectArray<double>(
this,pIndex).GetCount();
1714 FBX_ASSERT_NOW(
"Unknown type" );
break;
1738 if (
this == &pOther)
1744 mDataTypes = pOther.mDataTypes;
1745 mDataNames.Resize(pOther.mDataNames.GetCount());
1746 for(
int i = 0; i < pOther.mDataNames.GetCount(); ++i)
1747 mDataNames.SetAt(i, FbxNew< FbxString >( *pOther.mDataNames[i] ) );
1752 switch (mDataTypes[i].GetType())
1755 FbxGetDirectArray<bool>(
this, i) = FbxGetDirectArray<bool>(&pOther, i);
1759 FbxGetDirectArray<int>(
this, i) = FbxGetDirectArray<int>(&pOther, i);
1763 FbxGetDirectArray<float>(
this, i) = FbxGetDirectArray<float>(&pOther, i);
1767 FbxGetDirectArray<double>(
this, i) = FbxGetDirectArray<double>(&pOther, i);
1771 FBX_ASSERT_NOW(
"Unknown type" );
1796 for( i = 0; directArray !=
NULL && i < lCount; ++i )
1798 if( directArray[i] )
1803 for( i = 0; i < mDataNames.GetCount(); ++i )
1822 size +=
sizeof(mId);
1824 for(
int i = 0; i < mDataTypes.GetCount(); i++)
1826 size +=
sizeof(mDataTypes[i]);
1828 size += (mDataNames.GetCount() *
sizeof(
FbxString*));
1836 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1850 mDataTypes( pDataTypes )
1852 FBX_ASSERT( pDataTypes.GetCount() == pDataNames.GetCount() );
1853 for(
int i = 0; i < pDataNames.GetCount(); ++i )
1855 mDataNames.Add( FbxNew< FbxString >( pDataNames[i] ) );
1864 for (
int lIndex = 0; lIndex < pOther.mDataNames.GetCount(); ++lIndex)
1866 mDataNames.Add(FbxNew<FbxString>(*(pOther.mDataNames[lIndex])));
1874 switch (mDataTypes[i].GetType())
1877 FbxGetDirectArray<bool>(
this, i) = FbxGetDirectArray<bool>(&pOther, i);
1881 FbxGetDirectArray<int>(
this, i) = FbxGetDirectArray<int>(&pOther, i);
1885 FbxGetDirectArray<float>(
this, i) = FbxGetDirectArray<float>(&pOther, i);
1889 FbxGetDirectArray<double>(
this, i) = FbxGetDirectArray<double>(&pOther, i);
1893 FBX_ASSERT_NOW(
"Unknown type" );
1914 virtual void AllocateArrays()
1929 for( i = 0; i < mDataTypes.GetCount(); ++i )
1931 FbxHandle** dst =
NULL;
1935 switch( mDataTypes[i].GetType() )
1942 FBX_ASSERT_NOW(
"Trying to assign an unknown type" );
break;
1944 FbxHandle*** ptr = &dst;
2036 FBX_ASSERT_NOW(
"Smoothing layer elements must be direct mapped" );
2044 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2076 FBX_ASSERT_NOW(
"Crease layer elements must be direct mapped" );
2084 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2116 FBX_ASSERT_NOW(
"hole layer elements must be direct mapped" );
2124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2147 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2263 else if (pAlpha < 0.0)
2282 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2283 virtual int MemorySize()
const
2286 size +=
sizeof(mBlendMode);
2287 size +=
sizeof(mAlpha);
2303 EBlendMode mBlendMode;
2448 int GetUVSetCount()
const;
2703 void Clone(
FbxLayer const& pSrcLayer);
2708 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2737 virtual int MemoryUsage()
const;
2744 #define FBXSDK_FOR_EACH_TEXTURE(lLayerIndex) for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeTextureCount;(lLayerIndex)++)
2749 #define FBXSDK_FOR_EACH_NON_TEXTURE(lLayerIndex) for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeNonTextureCount;(lLayerIndex)++)
2754 #define FBXSDK_TEXTURE_INDEX(ElementType) (int(ElementType)-FbxLayerElement::sTypeTextureStartIndex)
2759 #define FBXSDK_TEXTURE_TYPE(TextureIndex) (FbxLayerElement::EType((TextureIndex)+FbxLayerElement::sTypeTextureStartIndex))
2764 #define FBXSDK_NON_TEXTURE_INDEX(ElementType) (int(ElementType)-FbxLayerElement::sTypeNonTextureStartIndex)
2769 #define FBXSDK_NON_TEXTURE_TYPE(Index) (FbxLayerElement::EType((Index)+FbxLayerElement::sTypeNonTextureStartIndex))
2797 #undef FBXSDK_LAYER_ELEMENT_CREATE_DECLARE
int RemapIndexArrayTo(FbxLayerElement *pLayerEl, FbxLayerElement::EMappingMode pNewMapping, FbxLayerElementArrayTemplate< int > *pIndexArray)
Remap the index array to a new EMappingMode.
int GetId() const
Queries the this layer element's ID.
FbxDataType FbxLayerElementUserDataDT
void SetCount(int pCount)
Sets the count of items in the data buffer.
FbxLayerElementArrayTemplate< int > & GetIndexArray() const
Returns the index array of Layer Elements.
Layer element for mapping Tangents to a geometry.
bool RemoveIt(T const &pItem)
Removes one item from the data buffer.
int GetReadLockCount() const
Retrieves the read lock count.
FbxLayerElement & operator=(FbxLayerElement const &pOther)
Assignment operator.
void * GetReference(int pIndex, EFbxType pValueType)
int GetArrayCount(int pIndex) const
Returns the direct array count for the attribute at pIndex.
FBX SDK environment definition.
void * GetImplementation()
int FindAfter(int pAfterIndex, T const &pItem) const
Searches for an item after the specified index in the data buffer.
void SetReferenceMode(EReferenceMode pReferenceMode)
Sets the Reference Mode.
#define FBXSDK_FRIEND_NEW()
FbxLayer class provides a base for the layering mechanism.
Layer element for mapping materials (FbxSurfaceMaterial) to a geometry.
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(const char *pName, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute name.
FbxLayerElementArrayTemplate(EFbxType pDataType)
Constructor.
void RemoveLast(void **pItem, EFbxType pValueType)
Removes the last item from the data buffer.
static const int sTypeTextureCount
The count of texture type layer elements.
bool Clear()
Removes all elements from the direct and the index arrays.
const T * GetData() const
bool IsWriteLocked() const
Returns whether write is locked.
FbxLayerElementBinormal FbxGeometryElementBinormal
FbxLayerElementNormal FbxGeometryElementNormal
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
const char * GetDataName(int pIndex) const
Returns the attribute name at the specified index.
EReferenceMode
Determines how the mapping information is stored in the array of coordinates.
void SetReferenceMode(FbxLayerElement::EReferenceMode pMode)
Sets the Reference Mode.
Abstract class for implementing I/O operations through a stream of data.
Double width floating point value.
T RemoveAt(int pIndex)
Removes the specified item from the data buffer.
EMappingMode GetMappingMode() const
Returns the Mapping Mode.
int FindBefore(int pBeforeIndex, T const &pItem)
Searches for one item before the specified index in the data buffer.
virtual int Read(void *, int) const =0
Read bytes from the stream and store them in the memory block.
FbxLayerElementArrayTemplate< Type > & GetDirectArray() const
Returns the direct array of Layer Elements.
This class contains material settings.
Utility class to manipulate strings.
void RemoveAt(int pIndex, T *pItem)
Removes the specified item from the data buffer.
FbxDataType FbxUndefinedDT
void SetLast(T const &pItem)
Sets the value of the last item.
Layer element for mapping custom user data to a geometry.
Contains a collection of FbxLayer objects.
int GetDirectArrayCount() const
Returns this layer element's direct array count.
Layer element for indicating if specified components are shown/hidden.
void SetAt(int pIndex, const void *pItem, EFbxType pValueType)
Sets the value for the specified item.
Layer element for mapping Vertex Colors to a geometry.
int RemapIndexTo(FbxLayerElement::EMappingMode pNewMapping)
Changes the Mapping mode to the new one and re-computes the index array.
int Find(const void *pItem, EFbxType pValueType) const
Searches for an item in the data buffer.
bool GetLast(T *pItem) const
Returns the last item's value.
void SetAt(int pIndex, T const &pItem)
Sets the value of the specified item.
void WriteUnlock() const
Releases the write lock on this array.
void SetMappingMode(EMappingMode pMappingMode)
Sets the Mapping Mode.
FbxLayerElementVertexColor FbxGeometryElementVertexColor
T GetAt(const int pIndex) const
Retrieve a copy of the element at given index position in the array.
void SetName(const char *pName)
Sets the name of this object.
Layer element for mapping UVs to a geometry.
void FbxDelete(T *p)
Deletion policy for pointer template classes that uses the FbxDelete() function.
Layer element for mapping Normals to a geometry.
int Find(T const &pItem)
Searches for an item in the data buffer.
This class is the base class for textures, ie classes FbxFileTexture, FbxLayeredTexture and FbxProced...
FbxLayerElementCrease FbxGeometryElementCrease
void SetReferenceMode(FbxLayerElement::EReferenceMode pMode)
Sets the Reference Mode.
void SetReferenceMode(FbxLayerElement::EReferenceMode pMode)
Sets the Reference Mode.
bool operator==(const FbxLayerElement &pOther) const
Equivalence operator.
int ReadLock() const
Increments the number of read locks on this array.
int InsertAt(int pIndex, T const &pItem)
Inserts a new item at the specified position of the data buffer.
bool RemoveIt(T *pItem)
Removes one item from the data buffer.
ELockMode
Identifies the access mode to the data buffer.
void SetLast(const void *pItem, EFbxType pValueType)
Sets the value of the last item.
const char * GetName() const
Returns the name of this object.
FbxLayerElementVisibility FbxGeometryElementVisibility
FbxSurfaceMaterial * FbxSurfaceMaterialPtr
FbxLayerElementArrayTemplate< Type > & GetDirectArray()
Returns the direct array of Layer Elements.
FbxLayerElementTemplate< FbxSurfaceMaterial * > ParentClass
const FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(const char *pName, bool *pStatus=((void *) 0)) const
Returns the direct array with the specified attribute name.
T GetAt(int pIndex) const
Returns the specified item's value.
void Clear()
Reset the number of element to zero and free the memory allocated.
int InsertAt(int pIndex, T const &pItem)
Inserts a new item at the specified position of the data buffer.
void SetAlpha(double pAlpha)
Sets the transparency level between multiple texture levels.
bool operator==(const FbxLayerElementTemplate &pOther) const
Equivalence operator.
FbxLayerElementArray & operator=(const FbxArray< T > &pArrayTemplate)
Assignment operator.
FbxDataType GetDataType(const char *pName) const
Returns the specified attribute data type.
bool GetFirst(T *pItem) const
Returns the first item's value.
int FindBefore(int pBeforeIndex, T const &pItem) const
Searches for one item before the specified index in the data buffer.
LockAccessStatus::ELockAccessStatus GetStatus() const
Retrieves the access state.
FbxLayerElementMaterial FbxGeometryElementMaterial
T RemoveLast()
Removes the last item from the data buffer.
FbxLayerElementTangent FbxGeometryElementTangent
FbxLayerElementTemplate & operator=(FbxLayerElementTemplate const &pOther)
Assignment operator.
FbxLayerElementArray is the base class for FbxLayerElementArrayTemplate, it provides lock handling an...
EFbxType
Type identifier constants.
void SetAt(int pIndex, T const &pItem)
Sets the value of the specified item.
This class complements the FbxLayerElement class.
bool RemoveIt(void **pItem, EFbxType pValueType)
Removes one item from the data buffer.
FbxTexture * FbxTexturePtr
virtual bool Clear()
Clears all the data from this layer element.
int GetCount() const
Returns the count of items in the data buffer.
EMappingMode
Determines how the element is mapped to a surface.
#define FBXSDK_LAYER_ELEMENT_CREATE_DECLARE(classDesc)
Layer element for indicating hole of polygon of a geometry.
void ClearStatus()
Clears the access state and sets it to eSuccess.
void SetAt(const int pIndex, const T &pElement)
Set the element at given position in the array.
int Add(T const &pItem)
Appends a new item to the end of the data buffer.
int Find(T const &pItem) const
Searches for an item in the data buffer.
FbxLayerElementUserData & operator=(FbxLayerElementUserData const &pOther)
Assignment operator which performs a deep copy.
EFbxType FbxTypeOf(const FbxRefPtr &)
static const int sTypeNonTextureCount
The count of non-texture type layer elements.
void SetLast(T const &pItem)
Sets the value of the last item.
void RemoveAt(int pIndex, void **pItem, EFbxType pValueType)
Removes the specified item from the data buffer.
FbxLayerElementArrayReadLock(FbxLayerElementArray &pArray)
int InsertAt(int pIndex, const void *pItem, EFbxType pValueType)
Inserts a new item at the specified position of the data buffer.
virtual bool ContentReadFrom(const FbxStream &pStream)
Reads the content of the object from the given stream.
virtual int Write(const void *, int)=0
Writes a memory block.
FbxLayerElementArrayTemplate< FbxSurfaceMaterial * > ParentClass
EFbxType GetType() const
Retrieve this data type.
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
Grants a locked access to the data buffer.
void Release(void **pDataPtr)
Unlock the data buffer.
Layer element for indicating smoothness of components of a geometry.
double GetAlpha() const
Returns the transparency level between multiple levels of textures.
Layer element for indicating crease of components of a geometry.
T GetLast() const
Returns the last item's value.
bool WriteLock() const
Locks this array for writing.
FbxLayerElementUserData FbxGeometryElementUserData
virtual void Release(void **pDataPtr, EFbxType pDataType)
Unlock the data buffer.
FbxLayerElementSmoothing FbxGeometryElementSmoothing
void Release(T **pDataPtr, T *dummy)
Unlock the data buffer.
void RemoveFromAllDirectArrays(int pIndex)
Removes a single element at pIndex from every direct array.
Layer element for mapping Textures to a geometry.
EType
Layer Element type identifier.
T operator[](int pIndex) const
Returns the specified item's value.
int ReadUnlock() const
Releases a read lock on this array.
FbxLayerElementUV FbxGeometryElementUV
FbxLayerElementArray * FbxLayerElementArrayPtr
bool Clear()
Removes all data from this layer element.
int FindAfter(int pAfterIndex, T const &pItem)
Searches for an item after the specified index in the data buffer.
FbxLayerElementArrayTemplate< T > & FbxGetDirectArray(FbxLayerElementUserData *pLayerElement, int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the given attribute index.
int Add(T const &pItem)
Appends a new item to the end of the data buffer.
#define FBX_SAFE_DELETE(p)
void * GetLocked(ELockMode pLockMode=eReadWriteLock)
Grants a locked access to the data buffer.
T * GetLocked(T *, ELockMode pLockMode=eReadWriteLock)
Grants a locked access to the data buffer.
Reference to object or property.
void RemoveLast(T *pItem)
Removes the last item from the data buffer.
FbxLayerElementPolygonGroup FbxGeometryElementPolygonGroup
FbxDataType GetDataType(int pIndex) const
Returns the data type for the specified index.
int FindAfter(int pAfterIndex, const void *pItem, EFbxType pValueType) const
Searches for an item after the specified index in the data buffer.
bool GetAt(int pIndex, void **pItem, EFbxType pValueType) const
Returns the specified item's value.
const FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0)) const
Returns the direct array with the specified attribute index.
FbxLayerElementArrayTemplate< int > & GetIndexArray()
Returns the index array of Layer Elements.
EBlendMode GetBlendMode() const
Returns the way Textures blend between layers.
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
FbxLayerElementHole FbxGeometryElementHole
Layer element for grouping related polygons together.
FbxLayerElement FbxGeometryElement
Defines geometry element classes.
~FbxLayerElementArrayReadLock()
void CopyTo(FbxArray< T > &pDst)
Copies the items in the data buffer to an array.
EReferenceMode GetReferenceMode() const
Returns the Reference Mode.
void ResizeAllDirectArrays(int pSize)
Resizes all direct arrays to the specified size.
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute index.
FbxLayerElementArrayTemplate< T > & operator=(const FbxLayerElementArrayTemplate< T > &pArrayTemplate)
Assignment operator.
EBlendMode
Lets you control how textures are combined when you apply multiple layers of texture to a surface...
void SetStatus(LockAccessStatus::ELockAccessStatus pVal) const
bool GetFirst(void **pItem, EFbxType pValueType) const
Returns the first item's value.
bool GetAt(int pIndex, T *pItem) const
Returns the specified item's value.
int Add(const void *pItem, EFbxType pValueType)
Appends a new item to the end of the data buffer.
bool GetLast(void **pItem, EFbxType pValueType) const
Returns the last item's value.
Base class for elements of layers (FbxLayer).
virtual int MemorySize() const
Queries the amount of memory used by this object as well as its content.
virtual bool ContentWriteTo(FbxStream &pStream) const
Writes the content of the object to the given stream.
Class for array of basic elements such as pointers and basic types.
int FindBefore(int pBeforeIndex, const void *pItem, EFbxType pValueType) const
Searches for an item before the specified index in the data buffer.
void SetBlendMode(EBlendMode pBlendMode)
Sets the way Textures blend between layers.
T GetFirst() const
Returns the first item's value.
Layer element for mapping Binormals to a geometry.