FBX C++ API Reference
fbxlayer.h File Reference

Go to the source code of this file.

Classes

class  FbxLayerElement
 Base class for elements of layers (FbxLayer). More...
 
class  LockAccessStatus
 
class  FbxLayerElementArray
 FbxLayerElementArray is the base class for FbxLayerElementArrayTemplate, it provides lock handling and data array manipulation of the data buffer for FbxLayerElement. More...
 
struct  FbxLayerElementArrayReadLock< T >
 
class  FbxLayerElementArrayTemplate< T >
 FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement. More...
 
class  FbxLayerElementTemplate< Type >
 This class complements the FbxLayerElement class. More...
 
class  FbxLayerElementNormal
 Layer element for mapping Normals to a geometry. More...
 
class  FbxLayerElementBinormal
 Layer element for mapping Binormals to a geometry. More...
 
class  FbxLayerElementTangent
 Layer element for mapping Tangents to a geometry. More...
 
class  FbxLayerElementMaterial
 Layer element for mapping materials (FbxSurfaceMaterial) to a geometry. More...
 
class  FbxLayerElementMaterial::LayerElementArrayProxy
 
class  FbxLayerElementPolygonGroup
 Layer element for grouping related polygons together. More...
 
class  FbxLayerElementUV
 Layer element for mapping UVs to a geometry. More...
 
class  FbxLayerElementVertexColor
 Layer element for mapping Vertex Colors to a geometry. More...
 
class  FbxLayerElementUserData
 Layer element for mapping custom user data to a geometry. More...
 
class  FbxLayerElementSmoothing
 Layer element for indicating smoothness of components of a geometry. More...
 
class  FbxLayerElementCrease
 Layer element for indicating crease of components of a geometry. More...
 
class  FbxLayerElementHole
 Layer element for indicating hole of polygon of a geometry. More...
 
class  FbxLayerElementVisibility
 Layer element for indicating if specified components are shown/hidden. More...
 
class  FbxLayerElementTexture
 Layer element for mapping Textures to a geometry. More...
 
class  FbxLayer
 FbxLayer class provides a base for the layering mechanism. More...
 

Macros

#define FBXSDK_LAYER_ELEMENT_CREATE_DECLARE(classDesc)
 
#define FBXSDK_FOR_EACH_TEXTURE(lLayerIndex)   for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeTextureCount;(lLayerIndex)++)
 Utility macro for iterating over texture layer elements. More...
 
#define FBXSDK_FOR_EACH_NON_TEXTURE(lLayerIndex)   for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeNonTextureCount;(lLayerIndex)++)
 Utility macro for iterating over non-texture layer elements. More...
 
#define FBXSDK_TEXTURE_INDEX(ElementType)   (int(ElementType)-FbxLayerElement::sTypeTextureStartIndex)
 Utility macro for getting texture layer element index by type. More...
 
#define FBXSDK_TEXTURE_TYPE(TextureIndex)   (FbxLayerElement::EType((TextureIndex)+FbxLayerElement::sTypeTextureStartIndex))
 Utility macro for getting texture layer element type by index. More...
 
#define FBXSDK_NON_TEXTURE_INDEX(ElementType)   (int(ElementType)-FbxLayerElement::sTypeNonTextureStartIndex)
 Utility macro for getting non-texture layer element index by type. More...
 
#define FBXSDK_NON_TEXTURE_TYPE(Index)   (FbxLayerElement::EType((Index)+FbxLayerElement::sTypeNonTextureStartIndex))
 Utility macro for getting non-texture layer element type by index. More...
 

Typedefs

typedef FbxHandle * FbxRefPtr
 
typedef FbxLayerElementArrayFbxLayerElementArrayPtr
 
typedef FbxSurfaceMaterialFbxSurfaceMaterialPtr
 
typedef FbxTextureFbxTexturePtr
 
typedef FbxLayerElement FbxGeometryElement
 Defines geometry element classes. More...
 
typedef FbxLayerElementNormal FbxGeometryElementNormal
 
typedef FbxLayerElementBinormal FbxGeometryElementBinormal
 
typedef FbxLayerElementTangent FbxGeometryElementTangent
 
typedef FbxLayerElementMaterial FbxGeometryElementMaterial
 
typedef FbxLayerElementPolygonGroup FbxGeometryElementPolygonGroup
 
typedef FbxLayerElementUV FbxGeometryElementUV
 
typedef FbxLayerElementVertexColor FbxGeometryElementVertexColor
 
typedef FbxLayerElementUserData FbxGeometryElementUserData
 
typedef FbxLayerElementSmoothing FbxGeometryElementSmoothing
 
typedef FbxLayerElementCrease FbxGeometryElementCrease
 
typedef FbxLayerElementHole FbxGeometryElementHole
 
typedef FbxLayerElementVisibility FbxGeometryElementVisibility
 

Enumerations

enum  EFbxMemoryClearMode { eClearToZero, eUninitialized }
 

Functions

EFbxType FbxTypeOf (const FbxRefPtr &)
 
EFbxType FbxTypeOf (const FbxLayerElementArrayPtr &)
 
EFbxType FbxTypeOf (const FbxSurfaceMaterialPtr &)
 
EFbxType FbxTypeOf (const FbxTexturePtr &)
 
int RemapIndexArrayTo (FbxLayerElement *pLayerEl, FbxLayerElement::EMappingMode pNewMapping, FbxLayerElementArrayTemplate< int > *pIndexArray)
 Remap the index array to a new EMappingMode. More...
 
template<class T >
FbxLayerElementArrayTemplate< T > & FbxGetDirectArray (FbxLayerElementUserData *pLayerElement, int pIndex, bool *pStatus)
 Returns the direct array with the given attribute index. More...
 
template<class T >
FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray (FbxLayerElementUserData const *pLayerElement, int pIndex, bool *pStatus)
 Returns the direct array with the given attribute index. More...
 
template<class T >
FbxLayerElementArrayTemplate< T > & FbxGetDirectArray (FbxLayerElementUserData *pLayerElement, const char *pName, bool *pStatus)
 Returns the direct array with the given attribute name.The template type must match the attribute type with pName. More...
 
template<class T >
FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray (FbxLayerElementUserData const *pLayerElement, const char *pName, bool *pStatus)
 Returns the direct array with the given attribute name.The template type must match the attribute type with pName. More...
 

Macro Definition Documentation

#define FBXSDK_LAYER_ELEMENT_CREATE_DECLARE (   classDesc)
Value:
static Fbx##classDesc* Create(FbxLayerContainer* pOwner, const char* pName);
#define FBXSDK_FRIEND_NEW()
Definition: fbxnew.h:420
Contains a collection of FbxLayer objects.

Definition at line 1316 of file fbxlayer.h.

#define FBXSDK_FOR_EACH_TEXTURE (   lLayerIndex)    for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeTextureCount;(lLayerIndex)++)

Utility macro for iterating over texture layer elements.

Examples:
ImportScene/DisplayTexture.cxx.

Definition at line 2773 of file fbxlayer.h.

#define FBXSDK_FOR_EACH_NON_TEXTURE (   lLayerIndex)    for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeNonTextureCount;(lLayerIndex)++)

Utility macro for iterating over non-texture layer elements.

Definition at line 2778 of file fbxlayer.h.

#define FBXSDK_TEXTURE_INDEX (   ElementType)    (int(ElementType)-FbxLayerElement::sTypeTextureStartIndex)

Utility macro for getting texture layer element index by type.

Definition at line 2783 of file fbxlayer.h.

#define FBXSDK_TEXTURE_TYPE (   TextureIndex)    (FbxLayerElement::EType((TextureIndex)+FbxLayerElement::sTypeTextureStartIndex))

Utility macro for getting texture layer element type by index.

Definition at line 2788 of file fbxlayer.h.

#define FBXSDK_NON_TEXTURE_INDEX (   ElementType)    (int(ElementType)-FbxLayerElement::sTypeNonTextureStartIndex)

Utility macro for getting non-texture layer element index by type.

Definition at line 2793 of file fbxlayer.h.

#define FBXSDK_NON_TEXTURE_TYPE (   Index)    (FbxLayerElement::EType((Index)+FbxLayerElement::sTypeNonTextureStartIndex))

Utility macro for getting non-texture layer element type by index.

Definition at line 2798 of file fbxlayer.h.

Typedef Documentation

typedef FbxHandle* FbxRefPtr

Definition at line 323 of file fbxlayer.h.

Definition at line 324 of file fbxlayer.h.

Definition at line 325 of file fbxlayer.h.

Definition at line 326 of file fbxlayer.h.

Defines geometry element classes.

A geometry element describes how the geometry element is mapped to a geometry surface and how the mapping information is arranged in memory.

Remarks
Geometry elements are independent of layer elements and hide the complexity of layers.
1 FbxGeometryElementUV* lUVs = lMesh->GetElementUV("map1");
2 FbxGeometryElementUV::DirectArrayType lDirectArray = lUVs->GetDirectArray();
3 int lDirectUVCount = lDirectArray.GetCount();
4 FbxVector2 lFirstUV = lDirectArray[0];
See also
FbxGeometryBase

Definition at line 2812 of file fbxlayer.h.

Definition at line 2813 of file fbxlayer.h.

Definition at line 2815 of file fbxlayer.h.

Definition at line 2818 of file fbxlayer.h.

Definition at line 2822 of file fbxlayer.h.

Definition at line 2823 of file fbxlayer.h.

Enumeration Type Documentation

Enumerator
eClearToZero 
eUninitialized 

Definition at line 316 of file fbxlayer.h.

317 {
318  eClearToZero,
320 };

Function Documentation

EFbxType FbxTypeOf ( const FbxRefPtr )
inline

Definition at line 328 of file fbxlayer.h.

328 { return eFbxReference; }
Reference to object or property.
EFbxType FbxTypeOf ( const FbxLayerElementArrayPtr )
inline

Definition at line 329 of file fbxlayer.h.

329 { return eFbxReference; }
Reference to object or property.
EFbxType FbxTypeOf ( const FbxSurfaceMaterialPtr )
inline

Definition at line 330 of file fbxlayer.h.

330 { return eFbxReference; }
Reference to object or property.
EFbxType FbxTypeOf ( const FbxTexturePtr )
inline

Definition at line 331 of file fbxlayer.h.

331 { return eFbxReference; }
Reference to object or property.
int RemapIndexArrayTo ( FbxLayerElement pLayerEl,
FbxLayerElement::EMappingMode  pNewMapping,
FbxLayerElementArrayTemplate< int > *  pIndexArray 
)

Remap the index array to a new EMappingMode.

Parameters
pLayerElThe layer element to remap
pNewMappingThe new mapping mode
pIndexArrayThe index array to modify
Returns
return -1 if the layer element is FbxLayerElement::eDirect 0 if layer element or index array is NULL and 1 if the remap is successful
FbxLayerElementArrayTemplate< T > & FbxGetDirectArray ( FbxLayerElementUserData pLayerElement,
int  pIndex,
bool *  pStatus 
)
inline

Returns the direct array with the given attribute index.

The template type must match the attribute type at pIndex.

Parameters
pLayerElementThe layer element whose direct array to return.
pIndexThe direct array index
pStatusWill be set to false if accessing the direct array encounters an error.
Returns
If pStatus receives true, the direct array at the given index is returned. Otherwise the return value is undefined.

Definition at line 1993 of file fbxlayer.h.

1994 {
1995  return *(FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pIndex,pStatus);
1996 }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute index.
Definition: fbxlayer.h:1568
FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray ( FbxLayerElementUserData const *  pLayerElement,
int  pIndex,
bool *  pStatus 
)
inline

Returns the direct array with the given attribute index.

The template type must match the attribute type at pIndex.

Parameters
pLayerElementThe layer element whose direct array to return.
pIndexThe direct array index
pStatusWill be set to false if accessing the direct array encounters an error.
Returns
If pStatus receives true, the direct array at the given index is returned. Otherwise the return value is undefined.

Definition at line 2006 of file fbxlayer.h.

2007 {
2008  return *(const FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pIndex,pStatus);
2009 }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
FbxLayerElementArrayTemplate< T > & FbxGetDirectArray ( FbxLayerElementUserData pLayerElement,
const char *  pName,
bool *  pStatus 
)
inline

Returns the direct array with the given attribute name.The template type must match the attribute type with pName.

Parameters
pLayerElementThe layer element whose direct array to return.
pNameThe given attribute name.
pStatusWill be set to false if accessing the direct array encounters an error.
Returns
If pStatus receives true, the direct array at the given index is returned. Otherwise the return value is undefined.

Definition at line 2020 of file fbxlayer.h.

2021 {
2022  return *(FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pName,pStatus);
2023 }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868
FbxLayerElementArrayTemplate< void * > * GetDirectArrayVoid(int pIndex, bool *pStatus=((void *) 0))
Returns the direct array with the specified attribute index.
Definition: fbxlayer.h:1568
FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray ( FbxLayerElementUserData const *  pLayerElement,
const char *  pName,
bool *  pStatus 
)
inline

Returns the direct array with the given attribute name.The template type must match the attribute type with pName.

Parameters
pLayerElementThe layer element whose direct array to return.
pNameThe given attribute name.
pStatusWill be set to false if accessing the direct array encounters an error.
Returns
If pStatus receives true, the direct array at the given index is returned. Otherwise the return value is undefined.

Definition at line 2033 of file fbxlayer.h.

2034 {
2035  return *(const FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pName,pStatus);
2036 }
FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement...
Definition: fbxlayer.h:868