FBX C++ API Reference
FbxLayerElementUserData Class Reference

Layer element for mapping custom user data to a geometry. More...

#include <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...
 

Detailed 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:
ExportScene03/main.cxx.

Definition at line 1540 of file fbxlayer.h.

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:
ExportScene03/main.cxx.
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:
ExportScene03/main.cxx.

Definition at line 1568 of file fbxlayer.h.

1569  {
1570  if( pIndex >= 0 || pIndex < GetDirectArray().GetCount() )
1571  {
1572  if (pStatus) *pStatus = true;
1573  return (FbxLayerElementArrayTemplate<void*>*)GetDirectArray().AsReference(pIndex);
1574  }
1575  else
1576  {
1577  if( pStatus ) *pStatus = false;
1578  FBX_ASSERT_NOW("Index out of bounds");
1580  }
1581  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
#define NULL
Definition: fbxarch.h:213
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1588 of file fbxlayer.h.

1589  {
1590  if( pIndex >= 0 || pIndex < GetDirectArray().GetCount() )
1591  {
1592  if (pStatus) *pStatus = true;
1593  return (FbxLayerElementArrayTemplate<void*>*)GetDirectArray().AsReference(pIndex);
1594  }
1595  else
1596  {
1597  if( pStatus ) *pStatus = false;
1598  FBX_ASSERT_NOW("Index out of bounds");
1600  }
1601  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
#define NULL
Definition: fbxarch.h:213
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1609 of file fbxlayer.h.

1610  {
1611  FbxString lName( pName );
1612  for( int i = 0; i < mDataNames.GetCount(); ++i )
1613  {
1614  if( *mDataNames[i] == lName )
1615  return GetDirectArrayVoid(i, pStatus);
1616  }
1617 
1618  if (pStatus) *pStatus = false;
1620  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
#define NULL
Definition: fbxarch.h:213
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:1568
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 1627 of file fbxlayer.h.

1628  {
1629  FbxString lName( pName );
1630  for( int i = 0; i < mDataNames.GetCount(); ++i )
1631  {
1632  if( *mDataNames[i] == lName )
1633  return GetDirectArrayVoid(i, pStatus);
1634  }
1635 
1636  if (pStatus) *pStatus = false;
1638  }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
#define NULL
Definition: fbxarch.h:213
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:1568
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 1644 of file fbxlayer.h.

1645  {
1646  if( pIndex < 0 || pIndex >= mDataTypes.GetCount() )
1647  return FbxUndefinedDT;
1648 
1649  return mDataTypes[pIndex];
1650  }
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 1656 of file fbxlayer.h.

1657  {
1658  FbxString lName( pName );
1659 
1660  for( int i = 0; i < mDataNames.GetCount(); ++i )
1661  {
1662  if( *mDataNames[i] == lName )
1663  return mDataTypes[i];
1664  }
1665 
1666  return FbxUndefinedDT;
1667  }
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 1673 of file fbxlayer.h.

1674  {
1675  if( pIndex >= 0 && pIndex < mDataNames.GetCount() )
1676  return mDataNames[pIndex]->Buffer();
1677 
1678  return NULL;
1679  }
#define NULL
Definition: fbxarch.h:213
void ResizeAllDirectArrays ( int  pSize)
inline

Resizes all direct arrays to the specified size.

Parameters
pSizeThe new size of the direct arrays.
Examples:
ExportScene03/main.cxx.

Definition at line 1684 of file fbxlayer.h.

1685  {
1686  for( int i = 0; i < GetDirectArray().GetCount(); ++i )
1687  {
1688  switch( mDataTypes[i].GetType() )
1689  {
1690  case eFbxBool: FbxGetDirectArray<bool>(this,i).Resize( pSize ) ; break;
1691  case eFbxInt: FbxGetDirectArray<int>(this,i).Resize( pSize ) ; break;
1692  case eFbxFloat: FbxGetDirectArray<float>(this,i).Resize( pSize ) ; break;
1693  case eFbxDouble: FbxGetDirectArray<double>(this,i).Resize( pSize ); break;
1694  //case eFbxDouble3: GetDirectArray< FbxDouble3 >(i).Resize( pSize ); break;
1695  //case eFbxDouble4: GetDirectArray< FbxDouble4 >(i).Resize( pSize ); break;
1696  //case eFbxDouble4x4: GetDirectArray< FbxDouble4x4>(i).Resize( pSize ); break;
1697  default:
1698  FBX_ASSERT_NOW("unknown type" ); break;
1699  }
1700  }
1701  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1706 of file fbxlayer.h.

1707  {
1708  for( int i = 0; i < GetDirectArray().GetCount(); ++i )
1709  {
1710  switch( mDataTypes[i].GetType() )
1711  {
1712  case eFbxBool: FbxGetDirectArray<bool>(this,i).RemoveAt( pIndex ) ; break;
1713  case eFbxInt: FbxGetDirectArray<int>(this,i).RemoveAt( pIndex ) ; break;
1714  case eFbxFloat: FbxGetDirectArray<float>(this,i).RemoveAt( pIndex ) ; break;
1715  case eFbxDouble: FbxGetDirectArray<double>(this,i).RemoveAt( pIndex ); break;
1716  //case eFbxDouble3: GetDirectArray< FbxDouble3 >(i).RemoveAt( pIndex ); break;
1717  //case eFbxDouble4: GetDirectArray< FbxDouble4 >(i).RemoveAt( pIndex ); break;
1718  //case eFbxDouble4x4: GetDirectArray< FbxDouble4x4>(i).RemoveAt( pIndex ); break;
1719  default:
1720  FBX_ASSERT_NOW("unknown type" ); break;
1721  }
1722  }
1723  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1729 of file fbxlayer.h.

1730  {
1731  if( pIndex >= 0 && pIndex < GetDirectArray().GetCount() )
1732  {
1733  switch( mDataTypes[pIndex].GetType() )
1734  {
1735  case eFbxBool: return FbxGetDirectArray<bool>(this,pIndex).GetCount();
1736  case eFbxInt: return FbxGetDirectArray<int>(this,pIndex).GetCount();
1737  case eFbxFloat: return FbxGetDirectArray<float>(this,pIndex).GetCount();
1738  case eFbxDouble: return FbxGetDirectArray<double>(this,pIndex).GetCount();
1739  //case eFbxDouble3: return GetDirectArray< FbxDouble3 >(pIndex).GetCount();
1740  //case eFbxDouble4: return GetDirectArray< FbxDouble4 >(pIndex).GetCount();
1741  //case eFbxDouble4x4: return GetDirectArray< FbxDouble4x4>(pIndex).GetCount();
1742  default:
1743  FBX_ASSERT_NOW("Unknown type" ); break;
1744  }
1745  }
1746 
1747  return -1;
1748  }
32 bit signed integer.
Double width floating point value.
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1753 of file fbxlayer.h.

1753 { 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 1759 of file fbxlayer.h.

1759 { return GetDirectArray().GetCount(); }
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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 1765 of file fbxlayer.h.

1766  {
1767  if (this == &pOther)
1768  return *this;
1769 
1770  Clear();
1771 
1772  mId = pOther.mId;
1773  mDataTypes = pOther.mDataTypes;
1774  mDataNames.Resize(pOther.mDataNames.GetCount());
1775  for(int i = 0; i < pOther.mDataNames.GetCount(); ++i)
1776  mDataNames.SetAt(i, FbxNew< FbxString >( *pOther.mDataNames[i] ) );
1777 
1778  Init();
1779  for(int i = 0; i < pOther.GetDirectArrayCount(); ++i)
1780  {
1781  switch (mDataTypes[i].GetType())
1782  {
1783  case eFbxBool:
1784  FbxGetDirectArray<bool>(this, i) = FbxGetDirectArray<bool>(&pOther, i);
1785  break;
1786 
1787  case eFbxInt:
1788  FbxGetDirectArray<int>(this, i) = FbxGetDirectArray<int>(&pOther, i);
1789  break;
1790 
1791  case eFbxFloat:
1792  FbxGetDirectArray<float>(this, i) = FbxGetDirectArray<float>(&pOther, i);
1793  break;
1794 
1795  case eFbxDouble:
1796  FbxGetDirectArray<double>(this, i) = FbxGetDirectArray<double>(&pOther, i);
1797  break;
1798 
1799  default:
1800  FBX_ASSERT_NOW("Unknown type" );
1801  break;
1802  }
1803  }
1804 
1805  if ( ( mReferenceMode == FbxLayerElement::eIndex ||
1806  mReferenceMode == FbxLayerElement::eIndexToDirect) &&
1807  ( pOther.GetReferenceMode() == FbxLayerElement::eIndex ||
1808  pOther.GetReferenceMode() == FbxLayerElement::eIndexToDirect))
1809  {
1810  GetIndexArray() = pOther.GetIndexArray();
1811  }
1812 
1813  return *this;
1814  }
FbxLayerElementArrayTemplate< int > & GetIndexArray() const
Returns the index array of Layer Elements.
Definition: fbxlayer.h:1070
32 bit signed integer.
Double width floating point value.
Boolean.
bool Clear()
Removes all data from this layer element.
Definition: fbxlayer.h:1819
Floating point value.
bool Clear ( )
inlinevirtual

Removes all data from this layer element.

Returns
True always

Reimplemented from FbxLayerElement.

Definition at line 1819 of file fbxlayer.h.

1820  {
1821  int i;
1822  const int lCount = GetDirectArray().GetCount();
1823  FbxLayerElementArray** directArray = NULL;
1824  directArray = GetDirectArray().GetLocked(directArray);
1825  for( i = 0; directArray != NULL && i < lCount; ++i )
1826  {
1827  if( directArray[i] )
1828  FbxDelete(directArray[i]);
1829  }
1830  FbxLayerElementArray*** ptr = &directArray;
1831  GetDirectArray().Release((void**)ptr);
1832  for( i = 0; i < mDataNames.GetCount(); ++i )
1833  {
1834  FBX_SAFE_DELETE(mDataNames[i]);
1835  }
1836  mDataNames.Clear();
1837  mDataTypes.Clear();
1838 
1840 
1841  return true;
1842  }
bool Clear()
Removes all elements from the direct and the index arrays.
Definition: fbxlayer.h:1090
#define NULL
Definition: fbxarch.h:213
FbxLayerElementArrayTemplate< void * > & GetDirectArray() const
Returns the direct array of Layer Elements.
Definition: fbxlayer.h:1050
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:338
#define FBX_SAFE_DELETE(p)
Definition: fbxsdk_def.h:53
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 1848 of file fbxlayer.h.

1849  {
1851  size += sizeof(mId);
1852 
1853  for(int i = 0; i < mDataTypes.GetCount(); i++)
1854  {
1855  size += sizeof(mDataTypes[i]);
1856  }
1857  size += (mDataNames.GetCount() * sizeof(FbxString*));
1858 
1859  return size;
1860  }
Utility class to manipulate strings.
Definition: fbxstring.h:66
This class complements the FbxLayerElement class.
Definition: fbxlayer.h:1042

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: