- Main Page
- Classes
- Files
- Directories

- File List
- File Members

Classes | Defines | Typedefs | Functions

# fbxlayer.h File Reference

This reference page is linked to from the following overview topics: Materials, Textures.

`#include <fbxsdk/fbxsdk_def.h>`
`#include <fbxsdk/core/fbxdatatypes.h>`
`#include <fbxsdk/core/fbxstream.h>`
`#include <fbxsdk/scene/shading/fbxsurfacematerial.h>`
`#include <fbxsdk/scene/shading/fbxtexture.h>`
`#include <fbxsdk/fbxsdk_nsbegin.h>`
`#include <fbxsdk/fbxsdk_nsend.h>`

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...
## Defines
#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.
#define | FBXSDK_FOR_EACH_NON_TEXTURE(lLayerIndex) for((lLayerIndex)=0;(lLayerIndex)<FbxLayerElement::sTypeNonTextureCount;(lLayerIndex)++)
| Utility macro for iterating over non-texture layer elements.
#define | FBXSDK_TEXTURE_INDEX(ElementType) (int(ElementType)-FbxLayerElement::sTypeTextureStartIndex)
| Utility macro for getting texture layer element index by type.
#define | FBXSDK_TEXTURE_TYPE(TextureIndex) (FbxLayerElement::EType((TextureIndex)+FbxLayerElement::sTypeTextureStartIndex))
| Utility macro for getting texture layer element type by index.
#define | FBXSDK_NON_TEXTURE_INDEX(ElementType) (int(ElementType)-FbxLayerElement::sTypeNonTextureStartIndex)
| Utility macro for getting non-texture layer element index by type.
#define | FBXSDK_NON_TEXTURE_TYPE(Index) (FbxLayerElement::EType((Index)+FbxLayerElement::sTypeNonTextureStartIndex))
| Utility macro for getting non-texture layer element type by index.
## Typedefs
typedef FbxHandle * | FbxRefPtr
typedef FbxLayerElementArray * | FbxLayerElementArrayPtr
typedef FbxSurfaceMaterial * | FbxSurfaceMaterialPtr
typedef FbxTexture * | FbxTexturePtr
typedef FbxLayerElement | FbxGeometryElement
| Defines geometry element classes.
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
## 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.
template<class T >
FbxLayerElementArrayTemplate< T > & | FbxGetDirectArray (FbxLayerElementUserData *pLayerElement, int pIndex, bool *pStatus)
| Returns the direct array with the given attribute index.
template<class T >
FbxLayerElementArrayTemplate < T > const & | FbxGetDirectArray (FbxLayerElementUserData const *pLayerElement, int pIndex, bool *pStatus)
| Returns the direct array with the given attribute index.
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.
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.

## Detailed Description

Definition in file fbxlayer.h.

## Define Documentation

#define FBXSDK_LAYER_ELEMENT_CREATE_DECLARE | ( |  | classDesc | ) |

Search for all occurrences
Value:

    FBXSDK_FRIEND_NEW();        \
        static Fbx##classDesc* Create(FbxLayerContainer* pOwner, char const *pName);

Definition at line 1259 of file fbxlayer.h.

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

Search for all occurrences

Utility macro for iterating over texture layer elements.

Definition at line 2715 of file fbxlayer.h.

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

Search for all occurrences

Utility macro for iterating over non-texture layer elements.

Definition at line 2720 of file fbxlayer.h.

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

Search for all occurrences

Utility macro for getting texture layer element index by type.

Definition at line 2725 of file fbxlayer.h.

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

Search for all occurrences

Utility macro for getting texture layer element type by index.

Definition at line 2730 of file fbxlayer.h.

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

Search for all occurrences

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

Definition at line 2735 of file fbxlayer.h.

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

Search for all occurrences

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

Definition at line 2740 of file fbxlayer.h.

## Typedef Documentation

typedef FbxHandle* FbxRefPtr

Search for all occurrences

Definition at line 310 of file fbxlayer.h.

typedef FbxLayerElementArray* FbxLayerElementArrayPtr

Search for all occurrences

Definition at line 311 of file fbxlayer.h.

typedef FbxSurfaceMaterial* FbxSurfaceMaterialPtr

Search for all occurrences

Definition at line 312 of file fbxlayer.h.

typedef FbxTexture* FbxTexturePtr

Search for all occurrences

Definition at line 313 of file fbxlayer.h.

typedef FbxLayerElement FbxGeometryElement

Search for all occurrences

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.

        FbxGeometryElementUV* lUVs = lMesh->GetElementUV("map1");
        FbxGeometryElementUV::DirectArrayType lDirectArray = lUVs->GetDirectArray();
        int lDirectUVCount = lDirectArray.GetCount();
        FbxVector2 lFirstUV = lDirectArray[0];

See also:
  FbxGeometryBase

Definition at line 2754 of file fbxlayer.h.

typedef FbxLayerElementNormal FbxGeometryElementNormal

Search for all occurrences

Definition at line 2755 of file fbxlayer.h.

typedef FbxLayerElementBinormal FbxGeometryElementBinormal

Search for all occurrences

Definition at line 2756 of file fbxlayer.h.

typedef FbxLayerElementTangent FbxGeometryElementTangent

Search for all occurrences

Definition at line 2757 of file fbxlayer.h.

typedef FbxLayerElementMaterial FbxGeometryElementMaterial

Search for all occurrences

Definition at line 2758 of file fbxlayer.h.

typedef FbxLayerElementPolygonGroup FbxGeometryElementPolygonGroup

Search for all occurrences

Definition at line 2759 of file fbxlayer.h.

typedef FbxLayerElementUV FbxGeometryElementUV

Search for all occurrences

Definition at line 2760 of file fbxlayer.h.

typedef FbxLayerElementVertexColor FbxGeometryElementVertexColor

Search for all occurrences

Definition at line 2761 of file fbxlayer.h.

typedef FbxLayerElementUserData FbxGeometryElementUserData

Search for all occurrences

Definition at line 2762 of file fbxlayer.h.

typedef FbxLayerElementSmoothing FbxGeometryElementSmoothing

Search for all occurrences

Definition at line 2763 of file fbxlayer.h.

typedef FbxLayerElementCrease FbxGeometryElementCrease

Search for all occurrences

Definition at line 2764 of file fbxlayer.h.

typedef FbxLayerElementHole FbxGeometryElementHole

Search for all occurrences

Definition at line 2765 of file fbxlayer.h.

typedef FbxLayerElementVisibility FbxGeometryElementVisibility

Search for all occurrences

Definition at line 2766 of file fbxlayer.h.

## Function Documentation

EFbxType FbxTypeOf | ( | const FbxRefPtr & |  | ) | `[inline]`

Search for all occurrences

Definition at line 315 of file fbxlayer.h.

    { return eFbxReference; }

EFbxType FbxTypeOf | ( | const FbxLayerElementArrayPtr & |  | ) | `[inline]`

Search for all occurrences

Definition at line 316 of file fbxlayer.h.

    { return eFbxReference; }

EFbxType FbxTypeOf | ( | const FbxSurfaceMaterialPtr & |  | ) | `[inline]`

Search for all occurrences

Definition at line 317 of file fbxlayer.h.

    { return eFbxReference; }

EFbxType FbxTypeOf | ( | const FbxTexturePtr & |  | ) | `[inline]`

Search for all occurrences

Definition at line 318 of file fbxlayer.h.

    { return eFbxReference; }

int RemapIndexArrayTo | ( | FbxLayerElement * | pLayerEl,
|  | FbxLayerElement::EMappingMode | pNewMapping,
|  | FbxLayerElementArrayTemplate< int > * | pIndexArray
| ) |  |

Search for all occurrences

Remap the index array to a new EMappingMode.

Parameters:

  pLayerEl | The layer element to remap
  pNewMapping | The new mapping mode
  pIndexArray | The 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]`

Search for all occurrences

Returns the direct array with the given attribute index.

The template type must match the attribute type at pIndex.

Parameters:

  pLayerElement | The layer element whose direct array to return.
  pIndex | The direct array index
  pStatus | Will 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 1935 of file fbxlayer.h.

    {
        return *(FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pIndex,pStatus);
    }

FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray | ( | FbxLayerElementUserData const * | pLayerElement,
|  | int | pIndex,
|  | bool * | pStatus
| ) |  | `[inline]`

Search for all occurrences

Returns the direct array with the given attribute index.

The template type must match the attribute type at pIndex.

Parameters:

  pLayerElement | The layer element whose direct array to return.
  pIndex | The direct array index
  pStatus | Will 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 1948 of file fbxlayer.h.

    {
        return *(FbxLayerElementArrayTemplate<T> const*)pLayerElement->GetDirectArrayVoid(pIndex,pStatus);
    }

FbxLayerElementArrayTemplate< T > & FbxGetDirectArray | ( | FbxLayerElementUserData * | pLayerElement,
|  | const char * | pName,
|  | bool * | pStatus
| ) |  | `[inline]`

Search for all occurrences

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

Parameters:

  pLayerElement | The layer element whose direct array to return.
  pName | The given attribute name.
  pStatus | Will 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 1962 of file fbxlayer.h.

    {
        return *(FbxLayerElementArrayTemplate<T>*)pLayerElement->GetDirectArrayVoid(pName,pStatus);
    }

FbxLayerElementArrayTemplate< T > const & FbxGetDirectArray | ( | FbxLayerElementUserData const * | pLayerElement,
|  | const char * | pName,
|  | bool * | pStatus
| ) |  | `[inline]`

Search for all occurrences

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

Parameters:

  pLayerElement | The layer element whose direct array to return.
  pName | The given attribute name.
  pStatus | Will 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 1975 of file fbxlayer.h.

    {
        return *(FbxLayerElementArrayTemplate<T> const*)pLayerElement->GetDirectArrayVoid(pName,pStatus);
    }