This reference page is linked to from the following overview topics: Layered Textures, List of Python Fbx classes.
FbxLayer class provides a base for the layering mechanism.
A layer can contain one or more of the following layer elements:
A typical layer for a Mesh contains Normals, UVs and Materials. A typical layer for NURBS contains only Materials. In the case of the NURBS, the NURBS' parameterization is used for the UVs; no UVs should be specified.
In most cases, you only need a single layer to describe a geometry. Many applications only support what is defined on the first layer. Take this into account when you fill the layer. For example, it is legal to define the Layer 0 with the UVs and then define the model's Normals on layer 1. However if you construct a file this way, it may not be imported correctly in other applications. Store the Normals in Layer 0 to avoid problems.
Since FBX SDK 2011, Textures are connected to the properties of FbxSurfaceMaterial derived classes. FbxLayerElementTexture is no longer used. See the code example in FbxLayerElementTexture for how to connect a texture.
Since FBX SDK 2011, texture layering is achieved by FbxLayeredTexture. See the code example in FbxLayeredTexture for how to blend textures.
Normally, you can access layer from FbxLayerContainer like FbxGeometry. For example,
FbxMesh* mesh; FbxLayer* layer0 = mesh->GetLayer(0); FbxLayerElementNormal* normals = layer0->GetNormals();
Definition at line 2333 of file fbxlayer.h.
#include <fbxlayer.h>
Public Member Functions | |
| FBXSDK_FRIEND_NEW () | |
| virtual int | MemoryUsage () const |
Friends | |
| class | FbxLayerContainer |
Layer Element Management | |
| FbxLayerElementNormal * | GetNormals () |
| Returns this layer's Normals description . | |
| FbxLayerElementNormal const * | GetNormals () const |
| Returns this layer's Normals description . | |
| FbxLayerElementTangent * | GetTangents () |
| Returns this layer's Tangents description. | |
| FbxLayerElementTangent const * | GetTangents () const |
| Returns this layer's Tangents description. | |
| FbxLayerElementBinormal * | GetBinormals () |
| Returns this layer's Binormals description. | |
| FbxLayerElementBinormal const * | GetBinormals () const |
| Returns this layer's Binormals description. | |
| FbxLayerElementMaterial * | GetMaterials () |
| Returns this layer's Materials description. | |
| FbxLayerElementMaterial const * | GetMaterials () const |
| Returns this layer's Materials description. | |
| FbxLayerElementPolygonGroup * | GetPolygonGroups () |
| Returns this layer's Polygon Groups description. | |
| FbxLayerElementPolygonGroup const * | GetPolygonGroups () const |
| Returns this layer's Polygon Groups description. | |
| FbxLayerElementUV * | GetUVs (FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eTextureDiffuse) |
| Returns this layer's UV description. | |
| FbxLayerElementUV const * | GetUVs (FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eTextureDiffuse) const |
| Returns this layer's UV description. | |
| int | GetUVSetCount () const |
| Returns the number of different UV sets in this layer. | |
| FbxArray< FbxLayerElement::EType > | GetUVSetChannels () const |
| Returns an array that describes which UV sets are in this layer. | |
| FbxArray< FbxLayerElementUV const * > | GetUVSets () const |
| Returns an array of UV sets in this layer. | |
| FbxLayerElementVertexColor * | GetVertexColors () |
| Returns this layer's Vertex Colors description. | |
| FbxLayerElementVertexColor const * | GetVertexColors () const |
| Returns this layer's Vertex Colors description. | |
| FbxLayerElementSmoothing * | GetSmoothing () |
| Returns this layer's Smoothing description. | |
| FbxLayerElementSmoothing const * | GetSmoothing () const |
| Returns this layer's Smoothing description. | |
| FbxLayerElementCrease * | GetVertexCrease () |
| Returns this layer's vertex crease description. | |
| FbxLayerElementCrease const * | GetVertexCrease () const |
| Returns this layer's vertex crease description. | |
| FbxLayerElementCrease * | GetEdgeCrease () |
| Returns this layer's edge crease description. | |
| FbxLayerElementCrease const * | GetEdgeCrease () const |
| Returns this layer's edge crease description. | |
| FbxLayerElementHole * | GetHole () |
| Returns this layer's Hole description. | |
| FbxLayerElementHole const * | GetHole () const |
| Returns this layer's Hole description. | |
| FbxLayerElementUserData * | GetUserData () |
| Returns this layer's User Data. | |
| FbxLayerElementUserData const * | GetUserData () const |
| Returns this layer's User Data. | |
| FbxLayerElementVisibility * | GetVisibility () |
| Returns this layer's visibility. | |
| FbxLayerElementVisibility const * | GetVisibility () const |
| Returns this layer's visibility. | |
| FbxLayerElementTexture * | GetTextures (FbxLayerElement::EType pType) |
| Returns this layer's Textures description. | |
| FbxLayerElementTexture const * | GetTextures (FbxLayerElement::EType pType) const |
| Returns this layer's Textures description. | |
| void | SetTextures (FbxLayerElement::EType pType, FbxLayerElementTexture *pTextures) |
| Sets this layer's Textures description. | |
| FbxLayerElement * | GetLayerElementOfType (FbxLayerElement::EType pType, bool pIsUV=false) |
| Returns the specified type of layer element description for this layer. | |
| FbxLayerElement const * | GetLayerElementOfType (FbxLayerElement::EType pType, bool pIsUV=false) const |
| Returns the specified type of layer element description for this layer. | |
| void | SetNormals (FbxLayerElementNormal *pNormals) |
| Sets this layer's Normals description. | |
| void | SetBinormals (FbxLayerElementBinormal *pBinormals) |
| Sets this layer's Binormals description. | |
| void | SetTangents (FbxLayerElementTangent *pTangents) |
| Sets this layer's Tangents description. | |
| void | SetMaterials (FbxLayerElementMaterial *pMaterials) |
| Sets this layer's Materials description. | |
| void | SetPolygonGroups (FbxLayerElementPolygonGroup *pPolygonGroups) |
| Sets this layer's Polygon Groups description. | |
| void | SetUVs (FbxLayerElementUV *pUVs, FbxLayerElement::EType pTypeIdentifier=FbxLayerElement::eTextureDiffuse) |
| Sets this layer's UVs description. | |
| void | SetVertexColors (FbxLayerElementVertexColor *pVertexColors) |
| Sets this layer's Vertex Colors description. | |
| void | SetSmoothing (FbxLayerElementSmoothing *pSmoothing) |
| Sets this layer's Smoothing description. | |
| void | SetVertexCrease (FbxLayerElementCrease *pCrease) |
| Sets this layer's Vertex Crease description. | |
| void | SetEdgeCrease (FbxLayerElementCrease *pCrease) |
| Sets this layer's Edge Crease description. | |
| void | SetHole (FbxLayerElementHole *pHole) |
| Sets this layer's Hole description. | |
| void | SetUserData (FbxLayerElementUserData *pUserData) |
| Sets this layer's User Data. | |
| void | SetVisibility (FbxLayerElementVisibility *pVisibility) |
| Sets this layer's the visibility. | |
| void | SetLayerElementOfType (FbxLayerElement *pLayerElement, FbxLayerElement::EType pType, bool pIsUV=false) |
| Sets the specified type of layer element description for this layer. | |
| FbxLayerElement * | CreateLayerElementOfType (FbxLayerElement::EType pType, bool pIsUV=false) |
| Creates the specified type of layer element description for this layer. | |
| void | Clone (FbxLayer const &pSrcLayer) |
| Clone function. | |
| FbxLayer & | operator= (FbxLayer const &pSrcLayer) |
| Assignment operator. | |
Serialization section | |
| bool | ContentWriteTo (FbxStream &pStream) const |
| bool | ContentReadFrom (const FbxStream &pStream) |
| FBXSDK_FRIEND_NEW | ( | ) |
| FbxLayerElementNormal* GetNormals | ( | ) |
Returns this layer's Normals description .
NULL if no Normals layer element is defined in this layer. | FbxLayerElementNormal const* GetNormals | ( | ) | const |
Returns this layer's Normals description .
NULL if no Normals layer element is defined in this layer. | FbxLayerElementTangent* GetTangents | ( | ) |
Returns this layer's Tangents description.
NULL if no Tangents layer element is defined in this layer. | FbxLayerElementTangent const* GetTangents | ( | ) | const |
Returns this layer's Tangents description.
NULL if no Tangents layer element is defined in this layer. | FbxLayerElementBinormal* GetBinormals | ( | ) |
Returns this layer's Binormals description.
NULL if no Binormals layer element is defined in this layer. | FbxLayerElementBinormal const* GetBinormals | ( | ) | const |
Returns this layer's Binormals description.
NULL if no Binormals layer element is defined in this layer. | FbxLayerElementMaterial* GetMaterials | ( | ) |
Returns this layer's Materials description.
NULL if no Materials layer element is defined in this layer. | FbxLayerElementMaterial const* GetMaterials | ( | ) | const |
Returns this layer's Materials description.
NULL if no Materials layer element is defined in this layer. | FbxLayerElementPolygonGroup* GetPolygonGroups | ( | ) |
Returns this layer's Polygon Groups description.
NULL if no Polygon Groups layer element is defined in this layer. | FbxLayerElementPolygonGroup const* GetPolygonGroups | ( | ) | const |
Returns this layer's Polygon Groups description.
NULL if no Polygon Groups layer element is defined in this layer. | FbxLayerElementUV* GetUVs | ( | FbxLayerElement::EType | pTypeIdentifier = FbxLayerElement::eTextureDiffuse | ) |
Returns this layer's UV description.
| pTypeIdentifier | Layer element type identifier, should be a texture type identifier. |
NULL if no UV is defined in this layer. | FbxLayerElementUV const* GetUVs | ( | FbxLayerElement::EType | pTypeIdentifier = FbxLayerElement::eTextureDiffuse | ) | const |
Returns this layer's UV description.
| pTypeIdentifier | Layer element type identifier, should be a texture type identifier. |
NULL if no UV is defined in this layer. | int GetUVSetCount | ( | ) | const |
Returns the number of different UV sets in this layer.
| FbxArray<FbxLayerElement::EType> GetUVSetChannels | ( | ) | const |
Returns an array that describes which UV sets are in this layer.
| FbxArray<FbxLayerElementUV const*> GetUVSets | ( | ) | const |
Returns an array of UV sets in this layer.
| FbxLayerElementVertexColor* GetVertexColors | ( | ) |
Returns this layer's Vertex Colors description.
NULL if no Vertex Color layer element is defined in this layer. | FbxLayerElementVertexColor const* GetVertexColors | ( | ) | const |
Returns this layer's Vertex Colors description.
NULL if no Vertex Color layer element is defined in this layer. | FbxLayerElementSmoothing* GetSmoothing | ( | ) |
Returns this layer's Smoothing description.
NULL if no Smoothing layer element is defined in this layer. | FbxLayerElementSmoothing const* GetSmoothing | ( | ) | const |
Returns this layer's Smoothing description.
NULL if no Smoothing layer element is defined in this layer. | FbxLayerElementCrease* GetVertexCrease | ( | ) |
Returns this layer's vertex crease description.
NULL if no Crease layer element is defined in this layer. | FbxLayerElementCrease const* GetVertexCrease | ( | ) | const |
Returns this layer's vertex crease description.
NULL if no Crease layer element is defined in this layer. | FbxLayerElementCrease* GetEdgeCrease | ( | ) |
Returns this layer's edge crease description.
NULL if no Crease layer element is defined in this layer. | FbxLayerElementCrease const* GetEdgeCrease | ( | ) | const |
Returns this layer's edge crease description.
NULL if no Crease layer element is defined in this layer. | FbxLayerElementHole* GetHole | ( | ) |
Returns this layer's Hole description.
NULL if no Hole layer element is defined in this layer. | FbxLayerElementHole const* GetHole | ( | ) | const |
Returns this layer's Hole description.
NULL if no Hole layer element is defined in this layer. | FbxLayerElementUserData* GetUserData | ( | ) |
Returns this layer's User Data.
NULL if no User Data layer element is defined in this layer. | FbxLayerElementUserData const* GetUserData | ( | ) | const |
Returns this layer's User Data.
NULL if no User Data layer element is defined in this layer. | FbxLayerElementVisibility* GetVisibility | ( | ) |
Returns this layer's visibility.
NULL if no visibility layer element is defined in this layer. | FbxLayerElementVisibility const* GetVisibility | ( | ) | const |
Returns this layer's visibility.
NULL if no visibility layer element is defined in this layer. | FbxLayerElementTexture* GetTextures | ( | FbxLayerElement::EType | pType | ) |
Returns this layer's Textures description.
| pType | Layer element type, should be a texture type identifier. |
NULL if no Textures layer element is defined in this layer. | FbxLayerElementTexture const* GetTextures | ( | FbxLayerElement::EType | pType | ) | const |
Returns this layer's Textures description.
| pType | Layer element type, should be a texture type identifier. |
NULL if no Textures layer element is defined in this layer. | void SetTextures | ( | FbxLayerElement::EType | pType, |
| FbxLayerElementTexture * | pTextures | ||
| ) |
Sets this layer's Textures description.
| pType | Texture type identifier. |
| pTextures | A pointer to the Textures layer element, or NULL to remove the Textures definition. |
| FbxLayerElement* GetLayerElementOfType | ( | FbxLayerElement::EType | pType, |
| bool | pIsUV = false |
||
| ) |
Returns the specified type of layer element description for this layer.
| pType | The required Layer element type.
|
| pIsUV | If true, requests the UV layer element that corresponds with the specified texture type. |
| FbxLayerElement const* GetLayerElementOfType | ( | FbxLayerElement::EType | pType, |
| bool | pIsUV = false |
||
| ) | const |
Returns the specified type of layer element description for this layer.
| pType | The required Layer element type.
|
| pIsUV | If true, requests the UV layer element that corresponds with the specified texture type. |
| void SetNormals | ( | FbxLayerElementNormal * | pNormals | ) |
Sets this layer's Normals description.
| pNormals | A pointer to the Normals layer element, or NULL to remove the Normals definition. |
| void SetBinormals | ( | FbxLayerElementBinormal * | pBinormals | ) |
Sets this layer's Binormals description.
| pBinormals | A pointer to the Binormals layer element, or NULL to remove the Binormals definition. |
| void SetTangents | ( | FbxLayerElementTangent * | pTangents | ) |
Sets this layer's Tangents description.
| pTangents | A pointer to the Tangents layer element, or NULL to remove the Tangents definition. |
| void SetMaterials | ( | FbxLayerElementMaterial * | pMaterials | ) |
Sets this layer's Materials description.
| pMaterials | A pointer to the Materials layer element, or NULL to remove the Material definition. |
| void SetPolygonGroups | ( | FbxLayerElementPolygonGroup * | pPolygonGroups | ) |
Sets this layer's Polygon Groups description.
| pPolygonGroups | A pointer to the Polygon Groups layer element, or NULL to remove the Polygon Group definition. |
| void SetUVs | ( | FbxLayerElementUV * | pUVs, |
| FbxLayerElement::EType | pTypeIdentifier = FbxLayerElement::eTextureDiffuse |
||
| ) |
Sets this layer's UVs description.
| pUVs | A pointer to the UVs layer element, or NULL to remove the UV definition. |
| pTypeIdentifier | Layer element type, should be texture type. |
| void SetVertexColors | ( | FbxLayerElementVertexColor * | pVertexColors | ) |
Sets this layer's Vertex Colors description.
| pVertexColors | A pointer to the Vertex Colors layer element, or NULL to remove the Vertex Color definition. |
| void SetSmoothing | ( | FbxLayerElementSmoothing * | pSmoothing | ) |
Sets this layer's Smoothing description.
| pSmoothing | A pointer to the Smoothing layer element, or NULL to remove the Smoothing definition. |
| void SetVertexCrease | ( | FbxLayerElementCrease * | pCrease | ) |
Sets this layer's Vertex Crease description.
| pCrease | A pointer to the Vertex Crease layer element, or NULL to remove the Crease definition. |
| void SetEdgeCrease | ( | FbxLayerElementCrease * | pCrease | ) |
Sets this layer's Edge Crease description.
| pCrease | A pointer to the Edge Crease layer element, or NULL to remove the Crease definition. |
| void SetHole | ( | FbxLayerElementHole * | pHole | ) |
Sets this layer's Hole description.
| pHole | A pointer to the Hole layer element, or NULL to remove the Hole definition. |
| void SetUserData | ( | FbxLayerElementUserData * | pUserData | ) |
Sets this layer's User Data.
| pUserData | A pointer to the User Data layer element, or NULL to remove the User Data. |
| void SetVisibility | ( | FbxLayerElementVisibility * | pVisibility | ) |
Sets this layer's the visibility.
| pVisibility | A pointer to the visibility layer element, or NULL to remove the visibility. |
| void SetLayerElementOfType | ( | FbxLayerElement * | pLayerElement, |
| FbxLayerElement::EType | pType, | ||
| bool | pIsUV = false |
||
| ) |
Sets the specified type of layer element description for this layer.
| pLayerElement | A pointer to the layer element, or NULL to remove the layer element. |
| pType | The required Layer element type.
|
| pIsUV | If true, requests the UV layer element that corresponds with the specified texture type. |
| FbxLayerElement* CreateLayerElementOfType | ( | FbxLayerElement::EType | pType, |
| bool | pIsUV = false |
||
| ) |
Creates the specified type of layer element description for this layer.
| pType | The required Layer element type. |
| pIsUV | When true, requests the UV LayerElement that corresponds with the specified Layer Element type (only applies to TEXTURE type layer elements). |
| void Clone | ( | FbxLayer const & | pSrcLayer | ) |
| bool ContentWriteTo | ( | FbxStream & | pStream | ) | const |
| bool ContentReadFrom | ( | const FbxStream & | pStream | ) |
| virtual int MemoryUsage | ( | ) | const [virtual] |
friend class FbxLayerContainer [friend] |
Definition at line 2698 of file fbxlayer.h.