FbxLayerElementUserData Class Reference

#include <fbxlayer.h>

Class Description

Layer element for mapping custom user data to a geometry.

This layer element is different from the other types of layer elements in that it has multiple direct arrays. There is one array for each user data attribute. Each array is indexed by the index array.

+ Examples:

Definition at line 1511 of file fbxlayer.h.

+ Inheritance diagram for FbxLayerElementUserData:

Public Member Functions

FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid (int pIndex, bool *pStatus=((void *) 0))
 Returns the direct array with the specified attribute index. More...
 
const FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid (int pIndex, bool *pStatus=((void *) 0)) const
 Returns the direct array with the specified attribute index. More...
 
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid (const char *pName, bool *pStatus=((void *) 0))
 Returns the direct array with the specified attribute name. More...
 
const FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid (const char *pName, bool *pStatus=((void *) 0)) const
 Returns the direct array with the specified attribute name. More...
 
FbxDataType GetDataType (int pIndex) const
 Returns the data type for the specified index. More...
 
FbxDataType GetDataType (const char *pName) const
 Returns the specified attribute data type. More...
 
const char * GetDataName (int pIndex) const
 Returns the attribute name at the specified index. More...
 
void ResizeAllDirectArrays (int pSize)
 Resizes all direct arrays to the specified size. More...
 
void RemoveFromAllDirectArrays (int pIndex)
 Removes a single element at pIndex from every direct array. More...
 
int GetArrayCount (int pIndex) const
 Returns the direct array count for the attribute at pIndex. More...
 
int GetId () const
 Queries the this layer element's ID. More...
 
int GetDirectArrayCount () const
 Returns this layer element's direct array count. More...
 
FbxLayerElementUserDataoperator= (FbxLayerElementUserData const &pOther)
 Assignment operator which performs a deep copy. More...
 
bool Clear ()
 Removes all data from this layer element. More...
 
virtual int MemorySize () const
 Queries the amount of memory used by this object as well as its content. More...
 
- Public Member Functions inherited from FbxLayerElementTemplate< void * >
FbxLayerElementArrayTemplate< void * > & GetDirectArray () const
 Returns the direct array of Layer Elements. More...
 
FbxLayerElementArrayTemplate< void * > & GetDirectArray ()
 Returns the direct array of Layer Elements. More...
 
FbxLayerElementArrayTemplate< int > & GetIndexArray () const
 Returns the index array of Layer Elements. More...
 
FbxLayerElementArrayTemplate< int > & GetIndexArray ()
 Returns the index array of Layer Elements. More...
 
bool Clear ()
 Removes all elements from the direct and the index arrays. More...
 
bool operator== (const FbxLayerElementTemplate &pOther) const
 Equivalence operator. More...
 
FbxLayerElementTemplateoperator= (FbxLayerElementTemplate const &pOther)
 Assignment operator. More...
 
int RemapIndexTo (FbxLayerElement::EMappingMode pNewMapping)
 Changes the Mapping mode to the new one and re-computes the index array. More...
 
- Public Member Functions inherited from FbxLayerElement
void SetMappingMode (EMappingMode pMappingMode)
 Sets the Mapping Mode. More...
 
void SetReferenceMode (EReferenceMode pReferenceMode)
 Sets the Reference Mode. More...
 
EMappingMode GetMappingMode () const
 Returns the Mapping Mode. More...
 
EReferenceMode GetReferenceMode () const
 Returns the Reference Mode. More...
 
void SetName (const char *pName)
 Sets the name of this object. More...
 
const char * GetName () const
 Returns the name of this object. More...
 
bool operator== (const FbxLayerElement &pOther) const
 Equivalence operator. More...
 
FbxLayerElementoperator= (FbxLayerElement const &pOther)
 Assignment operator. More...
 
void Destroy ()
 Removes this layer element from its owner and delete it. More...
 

Static Public Member Functions

static FbxLayerElementUserDataCreate (FbxLayerContainer *pOwner, const char *pName, int pId, FbxArray< FbxDataType > &pDataTypes, FbxArray< const char * > &pDataNames)
 Allocation method. More...
 
static FbxLayerElementUserDataCreate (FbxLayerContainer *pOwner, FbxLayerElementUserData const &pOther)
 Allocation method. More...
 

Friends

template<typename T >
T * fbxsdk::FbxNew ()
 
template<typename T , typename T1 >
T * fbxsdk::FbxNew (T1 &p1)
 
template<typename T , typename T1 >
T * fbxsdk::FbxNew (const T1 &p1)
 
template<typename T , typename T1 , typename T2 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (T1 &p1, T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, const T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
T * fbxsdk::FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9)
 
template<typename T >
void fbxsdk::FbxDelete (T *p)
 
template<typename T >
void fbxsdk::FbxDelete (const T *p)
 
template<typename T >
T * fbxsdk::FbxNewArray (const int n)
 
template<typename T >
void fbxsdk::FbxDeleteArray (T *p)
 

Additional Inherited Members

- Public Types inherited from FbxLayerElement
enum  EType {
  eUnknown, eNormal, eBiNormal, eTangent,
  eMaterial, ePolygonGroup, eUV, eVertexColor,
  eSmoothing, eVertexCrease, eEdgeCrease, eHole,
  eUserData, eVisibility, eTextureDiffuse, eTextureDiffuseFactor,
  eTextureEmissive, eTextureEmissiveFactor, eTextureAmbient, eTextureAmbientFactor,
  eTextureSpecular, eTextureSpecularFactor, eTextureShininess, eTextureNormalMap,
  eTextureBump, eTextureTransparency, eTextureTransparencyFactor, eTextureReflection,
  eTextureReflectionFactor, eTextureDisplacement, eTextureDisplacementVector, eTypeCount
}
 Layer Element type identifier. More...
 
enum  EMappingMode {
  eNone, eByControlPoint, eByPolygonVertex, eByPolygon,
  eByEdge, eAllSame
}
 Determines how the element is mapped to a surface. More...
 
enum  EReferenceMode { eDirect, eIndex, eIndexToDirect }
 Determines how the mapping information is stored in the array of coordinates. More...
 
- Static Public Attributes inherited from FbxLayerElement
static const int sTypeTextureStartIndex = int(eTextureDiffuse)
 The start index of texture type layer elements. More...
 
static const int sTypeTextureEndIndex = int(eTypeCount) - 1
 The end index of texture type layer elements. More...
 
static const int sTypeTextureCount = sTypeTextureEndIndex - sTypeTextureStartIndex + 1
 The count of texture type layer elements. More...
 
static const int sTypeNonTextureStartIndex = int(eNormal)
 The start index of non-texture type layer elements. More...
 
static const int sTypeNonTextureEndIndex = int(eVisibility)
 The end index of non-texture type layer elements. More...
 
static const int sTypeNonTextureCount = sTypeNonTextureEndIndex - sTypeNonTextureStartIndex + 1
 The count of non-texture type layer elements. More...
 
static const char *const sTextureNames []
 Array of names of texture type layer elements. More...
 
static const char *const sTextureUVNames []
 Array of names of UV layer elements. More...
 
static const char *const sNonTextureNames []
 Array of names of non-texture type layer elements. More...
 
static const FbxDataType sTextureDataTypes []
 Array of texture types. More...
 
static const char *const sTextureChannelNames []
 Array of texture channels. More...
 

Member Function Documentation

static FbxLayerElementUserData* Create ( FbxLayerContainer pOwner,
const char *  pName,
int  pId,
FbxArray< FbxDataType > &  pDataTypes,
FbxArray< const char * > &  pDataNames 
)
static

Allocation method.

Parameters
pOwnerThe owner of this layer element.
pNameThe layer element name.
pIdThe layer element ID.
pDataTypesAttribute data types of this layer element, one direct array is allocated for each Attribute data type.
pDataNamesAttribute names of this layer element.
Returns
A pointer to the layer element or NULL if creation fails.
Remarks
Only "bool", "int", "float" and "double" are supported.
+ Examples:
static FbxLayerElementUserData* Create ( FbxLayerContainer pOwner,
FbxLayerElementUserData const &  pOther 
)
static

Allocation method.

Parameters
pOwnerThe owner of this layer element.
pOtherOther layer element from which to copy.
Returns
A pointer to the layer element or NULL if creation fails.
FbxLayerElementArrayTemplate<void*>* GetDirectArrayVoid ( int  pIndex,
bool *  pStatus = ((void*)0) 
)
inline

Returns the direct array with the specified attribute index.

Parameters
pIndexSpecified attribute index.
pStatusA flag to indicate whether the direct array is returned successfully or not.
Returns
The specified attribute's direct array.
+ Examples:

Definition at line 1539 of file fbxlayer.h.

1540  {
1541  if( pIndex >= 0 || pIndex < GetDirectArray().GetCount() )
1542  {
1543  if (pStatus) *pStatus = true;
1544  return (FbxLayerElementArrayTemplate<void*>*)GetDirectArray().AsReference(pIndex);
1545  }
1546  else
1547  {
1548  if( pStatus ) *pStatus = false;
1549  FBX_ASSERT_NOW("Index out of bounds");
1551  }
1552  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:851
#define NULL
Definition: fbxarch.h:210
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
const FbxLayerElementArrayTemplate<void*>* GetDirectArrayVoid ( int  pIndex,
bool *  pStatus = ((void*)0) 
) const
inline

Returns the direct array with the specified attribute index.

Parameters
pIndexSpecified attribute index.
pStatusA flag to indicate whether the direct array is returned successfully or not.
Returns
The specified attribute's direct array.

Definition at line 1559 of file fbxlayer.h.

1560  {
1561  if( pIndex >= 0 || pIndex < GetDirectArray().GetCount() )
1562  {
1563  if (pStatus) *pStatus = true;
1564  return (FbxLayerElementArrayTemplate<void*>*)GetDirectArray().AsReference(pIndex);
1565  }
1566  else
1567  {
1568  if( pStatus ) *pStatus = false;
1569  FBX_ASSERT_NOW("Index out of bounds");
1571  }
1572  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:851
#define NULL
Definition: fbxarch.h:210
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
FbxLayerElementArrayTemplate<void *>* GetDirectArrayVoid ( const char *  pName,
bool *  pStatus = ((void*)0) 
)
inline

Returns the direct array with the specified attribute name.

Parameters
pNameSpecified attribute name.
pStatusA flag to indicate whether the direct array is returned successfully or not.
Returns
The specified attribute's direct array.

Definition at line 1580 of file fbxlayer.h.

1581  {
1582  FbxString lName( pName );
1583  for( int i = 0; i < mDataNames.GetCount(); ++i )
1584  {
1585  if( *mDataNames[i] == lName )
1586  return GetDirectArrayVoid(i, pStatus);
1587  }
1588 
1589  if (pStatus) *pStatus = false;
1591  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:851
#define NULL
Definition: fbxarch.h:210
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute index.
Definition: fbxlayer.h:1539
const FbxLayerElementArrayTemplate<void*>* GetDirectArrayVoid ( const char *  pName,
bool *  pStatus = ((void*)0) 
) const
inline

Returns the direct array with the specified attribute name.

Parameters
pNameSpecified attribute name.
pStatusA flag to indicate whether the direct array is returned successfully or not.
Returns
The specified attribute's direct array.

Definition at line 1598 of file fbxlayer.h.

1599  {
1600  FbxString lName( pName );
1601  for( int i = 0; i < mDataNames.GetCount(); ++i )
1602  {
1603  if( *mDataNames[i] == lName )
1604  return GetDirectArrayVoid(i, pStatus);
1605  }
1606 
1607  if (pStatus) *pStatus = false;
1609  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:851
#define NULL
Definition: fbxarch.h:210
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute index.
Definition: fbxlayer.h:1539
FbxDataType GetDataType ( int  pIndex) const
inline

Returns the data type for the specified index.

Parameters
pIndexThe index of the attribute being queried
Returns
The data type, or FbxUndefinedDT if pIndex is out of range

Definition at line 1615 of file fbxlayer.h.

1616  {
1617  if( pIndex < 0 || pIndex >= mDataTypes.GetCount() )
1618  return FbxUndefinedDT;
1619 
1620  return mDataTypes[pIndex];
1621  }
FbxDataType FbxUndefinedDT
FbxDataType GetDataType ( const char *  pName) const
inline

Returns the specified attribute data type.

Parameters
pNameThe name of the attribute being queried
Returns
The data type, or FbxUndefinedDT if no attribute has the given name

Definition at line 1627 of file fbxlayer.h.

1628  {
1629  FbxString lName( pName );
1630 
1631  for( int i = 0; i < mDataNames.GetCount(); ++i )
1632  {
1633  if( *mDataNames[i] == lName )
1634  return mDataTypes[i];
1635  }
1636 
1637  return FbxUndefinedDT;
1638  }
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxDataType FbxUndefinedDT
const char* GetDataName ( int  pIndex) const
inline

Returns the attribute name at the specified index.

Parameters
pIndexAttribute index
Returns
The name, or NULL if pIndex is out of range.

Definition at line 1644 of file fbxlayer.h.

1645  {
1646  if( pIndex >= 0 && pIndex < mDataNames.GetCount() )
1647  return mDataNames[pIndex]->Buffer();
1648 
1649  return NULL;
1650  }
#define NULL
Definition: fbxarch.h:210
void ResizeAllDirectArrays ( int  pSize)
inline

Resizes all direct arrays to the specified size.

Parameters
pSizeThe new size of the direct arrays.
+ Examples:

Definition at line 1655 of file fbxlayer.h.

1656  {
1657  for( int i = 0; i < GetDirectArray().GetCount(); ++i )
1658  {
1659  switch( mDataTypes[i].GetType() )
1660  {
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;
1665  //case eFbxDouble3: GetDirectArray< FbxDouble3 >(i).Resize( pSize ); break;
1666  //case eFbxDouble4: GetDirectArray< FbxDouble4 >(i).Resize( pSize ); break;
1667  //case eFbxDouble4x4: GetDirectArray< FbxDouble4x4>(i).Resize( pSize ); break;
1668  default:
1669  FBX_ASSERT_NOW("unknown type" ); break;
1670  }
1671  }
1672  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
Boolean.
Floating point value.
void RemoveFromAllDirectArrays ( int  pIndex)
inline

Removes a single element at pIndex from every direct array.

Parameters
pIndexThe index of the element to be removed.

Definition at line 1677 of file fbxlayer.h.

1678  {
1679  for( int i = 0; i < GetDirectArray().GetCount(); ++i )
1680  {
1681  switch( mDataTypes[i].GetType() )
1682  {
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;
1687  //case eFbxDouble3: GetDirectArray< FbxDouble3 >(i).RemoveAt( pIndex ); break;
1688  //case eFbxDouble4: GetDirectArray< FbxDouble4 >(i).RemoveAt( pIndex ); break;
1689  //case eFbxDouble4x4: GetDirectArray< FbxDouble4x4>(i).RemoveAt( pIndex ); break;
1690  default:
1691  FBX_ASSERT_NOW("unknown type" ); break;
1692  }
1693  }
1694  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
Boolean.
Floating point value.
int GetArrayCount ( int  pIndex) const
inline

Returns the direct array count for the attribute at pIndex.

Parameters
pIndexThe attribute index
Returns
The specified attribute's direct array count.

Definition at line 1700 of file fbxlayer.h.

1701  {
1702  if( pIndex >= 0 && pIndex < GetDirectArray().GetCount() )
1703  {
1704  switch( mDataTypes[pIndex].GetType() )
1705  {
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();
1710  //case eFbxDouble3: return GetDirectArray< FbxDouble3 >(pIndex).GetCount();
1711  //case eFbxDouble4: return GetDirectArray< FbxDouble4 >(pIndex).GetCount();
1712  //case eFbxDouble4x4: return GetDirectArray< FbxDouble4x4>(pIndex).GetCount();
1713  default:
1714  FBX_ASSERT_NOW("Unknown type" ); break;
1715  }
1716  }
1717 
1718  return -1;
1719  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
Boolean.
Floating point value.
int GetId ( ) const
inline

Queries the this layer element's ID.

Returns
The ID expressed as an int

Definition at line 1724 of file fbxlayer.h.

1724 { return mId; }
int GetDirectArrayCount ( ) const
inline

Returns this layer element's direct array count.

Returns
The direct array count expressed as an int.
Remarks
This count should be equal to the count of user data attributes.

Definition at line 1730 of file fbxlayer.h.

1730 { return GetDirectArray().GetCount(); }
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
FbxLayerElementUserData& operator= ( FbxLayerElementUserData const &  pOther)
inline

Assignment operator which performs a deep copy.

Parameters
pOtherOther FbxLayerElementUserData from which to perform a deep copy.
Returns
This FbxLayerElementUserData.

Definition at line 1736 of file fbxlayer.h.

1737  {
1738  if (this == &pOther)
1739  return *this;
1740 
1741  Clear();
1742 
1743  mId = pOther.mId;
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] ) );
1748 
1749  Init();
1750  for(int i = 0; i < pOther.GetDirectArrayCount(); ++i)
1751  {
1752  switch (mDataTypes[i].GetType())
1753  {
1754  case eFbxBool:
1755  FbxGetDirectArray<bool>(this, i) = FbxGetDirectArray<bool>(&pOther, i);
1756  break;
1757 
1758  case eFbxInt:
1759  FbxGetDirectArray<int>(this, i) = FbxGetDirectArray<int>(&pOther, i);
1760  break;
1761 
1762  case eFbxFloat:
1763  FbxGetDirectArray<float>(this, i) = FbxGetDirectArray<float>(&pOther, i);
1764  break;
1765 
1766  case eFbxDouble:
1767  FbxGetDirectArray<double>(this, i) = FbxGetDirectArray<double>(&pOther, i);
1768  break;
1769 
1770  default:
1771  FBX_ASSERT_NOW("Unknown type" );
1772  break;
1773  }
1774  }
1775 
1776  if ( ( mReferenceMode == FbxLayerElement::eIndex ||
1777  mReferenceMode == FbxLayerElement::eIndexToDirect) &&
1778  ( pOther.GetReferenceMode() == FbxLayerElement::eIndex ||
1779  pOther.GetReferenceMode() == FbxLayerElement::eIndexToDirect))
1780  {
1781  GetIndexArray() = pOther.GetIndexArray();
1782  }
1783 
1784  return *this;
1785  }
FbxLayerElementArrayTemplate< int > & GetIndexArray() const
Returns the index array of Layer Elements.
Definition: fbxlayer.h:1043
32 bit signed integer.
Double width floating point value.
Boolean.
bool Clear()
Removes all data from this layer element.
Definition: fbxlayer.h:1790
Floating point value.
bool Clear ( )
inlinevirtual

Removes all data from this layer element.

Returns
True always

Reimplemented from FbxLayerElement.

Definition at line 1790 of file fbxlayer.h.

1791  {
1792  int i;
1793  const int lCount = GetDirectArray().GetCount();
1794  FbxLayerElementArray** directArray = NULL;
1795  directArray = GetDirectArray().GetLocked(directArray);
1796  for( i = 0; directArray != NULL && i < lCount; ++i )
1797  {
1798  if( directArray[i] )
1799  FbxDelete(directArray[i]);
1800  }
1801  FbxLayerElementArray*** ptr = &directArray;
1802  GetDirectArray().Release((void**)ptr);
1803  for( i = 0; i < mDataNames.GetCount(); ++i )
1804  {
1805  FBX_SAFE_DELETE(mDataNames[i]);
1806  }
1807  mDataNames.Clear();
1808  mDataTypes.Clear();
1809 
1811 
1812  return true;
1813  }
bool Clear()
Removes all elements from the direct and the index arrays.
Definition: fbxlayer.h:1063
#define NULL
Definition: fbxarch.h:210
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1023
void FbxDelete(T *p)
Deletion policy for pointer template classes that uses the FbxDelete() function.
Definition: fbxnew.h:341
FbxLayerElementArray is the base class for FbxLayerElementArrayTemplate, it provides lock handling an...
Definition: fbxlayer.h:325
#define FBX_SAFE_DELETE(p)
Definition: fbxsdk_def.h:50
virtual int MemorySize ( ) const
inlinevirtual

Queries the amount of memory used by this object as well as its content.

It does not consider the content pointed.

Returns
The amount of memory used.

Definition at line 1819 of file fbxlayer.h.

1820  {
1822  size += sizeof(mId);
1823 
1824  for(int i = 0; i < mDataTypes.GetCount(); i++)
1825  {
1826  size += sizeof(mDataTypes[i]);
1827  }
1828  size += (mDataNames.GetCount() * sizeof(FbxString*));
1829 
1830  return size;
1831  }
Utility class to manipulate strings.
Definition: fbxstring.h:66
This class complements the FbxLayerElement class.
Definition: fbxlayer.h:1015

Friends And Related Function Documentation

T* fbxsdk::FbxNew ( )
friend
T* fbxsdk::FbxNew ( T1 &  p1)
friend
T* fbxsdk::FbxNew ( const T1 &  p1)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)
friend
T* fbxsdk::FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
const T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4,
const T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4,
const T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7,
const T8 &  p8 
)
friend
T* fbxsdk::FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7,
const T8 &  p8,
const T9 &  p9 
)
friend
void fbxsdk::FbxDelete ( T *  p)
friend
void fbxsdk::FbxDelete ( const T *  p)
friend
T* fbxsdk::FbxNewArray ( const int  n)
friend
void fbxsdk::FbxDeleteArray ( T *  p)
friend

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