This reference page is linked to from the following overview topics: Layered Textures, List of Python FBX classes.
KFbxLayer 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 KFbxSurfaceMaterial derived classes. KFbxLayerElementTexture is no longer used. See the code example in KFbxLayerElementTexture for how to connect a texture.
Since FBX SDK 2011, texture layering is achieved by KFbxLayeredTexture. See the code example in KFbxLayeredTexture for how to blend textures.
Normally, you can access layer from KFbxLayerContainer like KFbxGeometry. For example,
KFbxMesh* mesh; KFbxLayer* layer0 = mesh->GetLayer(0); KFbxLayerElementNormal* normals = layer0->GetNormals();
Definition at line 2443 of file kfbxlayer.h.
#include <kfbxlayer.h>
Public Member Functions |
|
virtual int | MemoryUsage () const |
Friends |
|
class | KFbxLayerContainer |
Layer Element Management |
|
KFbxLayerElementNormal * | GetNormals () |
Returns this layer's Normals description .
|
|
KFbxLayerElementNormal const * | GetNormals () const |
Returns this layer's Normals description .
|
|
KFbxLayerElementTangent * | GetTangents () |
Returns this layer's Tangents description.
|
|
KFbxLayerElementTangent const * | GetTangents () const |
Returns this layer's Tangents description.
|
|
KFbxLayerElementBinormal * | GetBinormals () |
Returns this layer's Binormals description.
|
|
KFbxLayerElementBinormal const * | GetBinormals () const |
Returns this layer's Binormals description.
|
|
KFbxLayerElementMaterial * | GetMaterials () |
Returns this layer's Materials description.
|
|
KFbxLayerElementMaterial const * | GetMaterials () const |
Returns this layer's Materials description.
|
|
KFbxLayerElementPolygonGroup * | GetPolygonGroups () |
Returns this layer's Polygon Groups
description. |
|
KFbxLayerElementPolygonGroup const * |
GetPolygonGroups () const |
Returns this layer's Polygon Groups
description. |
|
KFbxLayerElementUV * | GetUVs (KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES) |
Returns this layer's UV description.
|
|
KFbxLayerElementUV const * | GetUVs (KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES) const |
Returns this layer's UV description.
|
|
int | GetUVSetCount () const |
Returns the number of different UV sets in
this layer. |
|
KArrayTemplate < KFbxLayerElement::ELayerElementType > |
GetUVSetChannels () const |
Returns an array that describes which UV
sets are in this layer. |
|
KArrayTemplate < KFbxLayerElementUV const * > |
GetUVSets () const |
Returns an array of UV sets in this layer.
|
|
KFbxLayerElementVertexColor * | GetVertexColors () |
Returns this layer's Vertex Colors
description. |
|
KFbxLayerElementVertexColor const * | GetVertexColors () const |
Returns this layer's Vertex Colors
description. |
|
KFbxLayerElementSmoothing * | GetSmoothing () |
Returns this layer's Smoothing description.
|
|
KFbxLayerElementSmoothing const * | GetSmoothing () const |
Returns this layer's Smoothing description.
|
|
KFbxLayerElementCrease * | GetVertexCrease () |
Returns this layer's vertex crease
description. |
|
KFbxLayerElementCrease const * | GetVertexCrease () const |
Returns this layer's vertex crease
description. |
|
KFbxLayerElementCrease * | GetEdgeCrease () |
Returns this layer's edge crease
description. |
|
KFbxLayerElementCrease const * | GetEdgeCrease () const |
Returns this layer's edge crease
description. |
|
KFbxLayerElementHole * | GetHole () |
Returns this layer's Hole description.
|
|
KFbxLayerElementHole const * | GetHole () const |
Returns this layer's Hole description.
|
|
KFbxLayerElementUserData * | GetUserData () |
Returns this layer's User Data. |
|
KFbxLayerElementUserData const * | GetUserData () const |
Returns this layer's User Data. |
|
KFbxLayerElementVisibility * | GetVisibility () |
Returns this layer's visibility. |
|
KFbxLayerElementVisibility const * | GetVisibility () const |
Returns this layer's visibility. |
|
KFbxLayerElementTexture * | GetTextures (KFbxLayerElement::ELayerElementType pType) |
Returns this layer's Textures description.
|
|
KFbxLayerElementTexture const * | GetTextures (KFbxLayerElement::ELayerElementType pType) const |
Returns this layer's Textures description.
|
|
void | SetTextures (KFbxLayerElement::ELayerElementType pType, KFbxLayerElementTexture *pTextures) |
Sets this layer's Textures description.
|
|
KFbxLayerElement * | GetLayerElementOfType (KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) |
Returns the specified type of layer element
description for this layer. |
|
KFbxLayerElement const * | GetLayerElementOfType (KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const |
Returns the specified type of layer element
description for this layer. |
|
void | SetNormals (KFbxLayerElementNormal *pNormals) |
Sets this layer's Normals description.
|
|
void | SetBinormals (KFbxLayerElementBinormal *pBinormals) |
Sets this layer's Binormals description.
|
|
void | SetTangents (KFbxLayerElementTangent *pTangents) |
Sets this layer's Tangents description.
|
|
void | SetMaterials (KFbxLayerElementMaterial *pMaterials) |
Sets this layer's Materials description.
|
|
void | SetPolygonGroups (KFbxLayerElementPolygonGroup *pPolygonGroups) |
Sets this layer's Polygon Groups
description. |
|
void | SetUVs (KFbxLayerElementUV *pUVs, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES) |
Sets this layer's UVs description. |
|
void | SetVertexColors (KFbxLayerElementVertexColor *pVertexColors) |
Sets this layer's Vertex Colors description.
|
|
void | SetSmoothing (KFbxLayerElementSmoothing *pSmoothing) |
Sets this layer's Smoothing description.
|
|
void | SetVertexCrease (KFbxLayerElementCrease *pCrease) |
Sets this layer's Vertex Crease description.
|
|
void | SetEdgeCrease (KFbxLayerElementCrease *pCrease) |
Sets this layer's Edge Crease description.
|
|
void | SetHole (KFbxLayerElementHole *pHole) |
Sets this layer's Hole description. |
|
void | SetUserData (KFbxLayerElementUserData *pUserData) |
Sets this layer's User Data. |
|
void | SetVisibility (KFbxLayerElementVisibility *pVisibility) |
Sets this layer's the visibility. |
|
void | SetLayerElementOfType (KFbxLayerElement *pLayerElement, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) |
Sets the specified type of layer element
description for this layer. |
|
KFbxLayerElement * | CreateLayerElementOfType (KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) |
Creates the specified type of layer element
description for this layer. |
|
void | Clone (KFbxLayer const &pSrcLayer, KFbxSdkManager *pSdkManager) |
Clone function. |
|
KFbxLayer & | operator= (KFbxLayer const &pSrcLayer) |
Assignment operator. |
|
Serialization section |
|
bool | ContentWriteTo (KFbxStream &pStream) const |
bool | ContentReadFrom (const KFbxStream &pStream) |
KFbxLayerElementNormal* GetNormals | ( | ) |
Returns this layer's Normals description .
NULL
if
no Normals layer element is defined in this layer.KFbxLayerElementNormal const* GetNormals | ( | ) | const |
Returns this layer's Normals description .
NULL
if
no Normals layer element is defined in this layer.KFbxLayerElementTangent* GetTangents | ( | ) |
Returns this layer's Tangents description.
NULL
if no Tangents layer element is defined in this layer.KFbxLayerElementTangent const* GetTangents | ( | ) | const |
Returns this layer's Tangents description.
NULL
if no Tangents layer element is defined in this layer.KFbxLayerElementBinormal* GetBinormals | ( | ) |
Returns this layer's Binormals description.
NULL
if no Binormals layer element is defined in this layer.KFbxLayerElementBinormal const* GetBinormals | ( | ) | const |
Returns this layer's Binormals description.
NULL
if no Binormals layer element is defined in this layer.KFbxLayerElementMaterial* GetMaterials | ( | ) |
Returns this layer's Materials description.
NULL
if no Materials layer element is defined in this layer.KFbxLayerElementMaterial const* GetMaterials | ( | ) | const |
Returns this layer's Materials description.
NULL
if no Materials layer element is defined in this layer.KFbxLayerElementPolygonGroup* GetPolygonGroups | ( | ) |
Returns this layer's Polygon Groups description.
NULL
if no Polygon Groups layer element is defined in
this layer.KFbxLayerElementPolygonGroup const* GetPolygonGroups | ( | ) | const |
Returns this layer's Polygon Groups description.
NULL
if no Polygon Groups layer element is defined in
this layer.KFbxLayerElementUV* GetUVs | ( | KFbxLayerElement::ELayerElementType | pTypeIdentifier =
KFbxLayerElement::eDIFFUSE_TEXTURES |
) |
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.KFbxLayerElementUV const* GetUVs | ( | KFbxLayerElement::ELayerElementType | pTypeIdentifier =
KFbxLayerElement::eDIFFUSE_TEXTURES |
) | 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.
KArrayTemplate<KFbxLayerElement::ELayerElementType> GetUVSetChannels | ( | ) | const |
Returns an array that describes which UV sets are in this layer.
KArrayTemplate<KFbxLayerElementUV const*> GetUVSets | ( | ) | const |
Returns an array of UV sets in this layer.
KFbxLayerElementVertexColor* GetVertexColors | ( | ) |
Returns this layer's Vertex Colors description.
NULL
if no Vertex Color layer element is defined in
this layer.KFbxLayerElementVertexColor const* GetVertexColors | ( | ) | const |
Returns this layer's Vertex Colors description.
NULL
if no Vertex Color layer element is defined in
this layer.KFbxLayerElementSmoothing* GetSmoothing | ( | ) |
Returns this layer's Smoothing description.
NULL
if no Smoothing layer element is defined in this layer.KFbxLayerElementSmoothing const* GetSmoothing | ( | ) | const |
Returns this layer's Smoothing description.
NULL
if no Smoothing layer element is defined in this layer.KFbxLayerElementCrease* GetVertexCrease | ( | ) |
Returns this layer's vertex crease description.
NULL
if
no Crease layer element is defined in this layer.KFbxLayerElementCrease const* GetVertexCrease | ( | ) | const |
Returns this layer's vertex crease description.
NULL
if
no Crease layer element is defined in this layer.KFbxLayerElementCrease* GetEdgeCrease | ( | ) |
Returns this layer's edge crease description.
NULL
if
no Crease layer element is defined in this layer.KFbxLayerElementCrease const* GetEdgeCrease | ( | ) | const |
Returns this layer's edge crease description.
NULL
if
no Crease layer element is defined in this layer.KFbxLayerElementHole* GetHole | ( | ) |
Returns this layer's Hole description.
NULL
if no
Hole layer element is defined in this layer.KFbxLayerElementHole const* GetHole | ( | ) | const |
Returns this layer's Hole description.
NULL
if no
Hole layer element is defined in this layer.KFbxLayerElementUserData* GetUserData | ( | ) |
Returns this layer's User Data.
NULL
if no User Data layer element is defined in this layer.KFbxLayerElementUserData const* GetUserData | ( | ) | const |
Returns this layer's User Data.
NULL
if no User Data layer element is defined in this layer.KFbxLayerElementVisibility* GetVisibility | ( | ) |
Returns this layer's visibility.
NULL
if no visibility layer element is defined in this layer.KFbxLayerElementVisibility const* GetVisibility | ( | ) | const |
Returns this layer's visibility.
NULL
if no visibility layer element is defined in this layer.KFbxLayerElementTexture* GetTextures | ( | KFbxLayerElement::ELayerElementType | 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.KFbxLayerElementTexture const* GetTextures | ( | KFbxLayerElement::ELayerElementType | 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 | ( | KFbxLayerElement::ELayerElementType | pType, |
KFbxLayerElementTexture * | 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. |
KFbxLayerElement* GetLayerElementOfType | ( | KFbxLayerElement::ELayerElementType | 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. |
KFbxLayerElement const* GetLayerElementOfType | ( | KFbxLayerElement::ELayerElementType | 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 | ( | KFbxLayerElementNormal * | pNormals | ) |
Sets this layer's Normals description.
pNormals | A pointer to the Normals layer element, or NULL to
remove the Normals definition. |
void SetBinormals | ( | KFbxLayerElementBinormal * | pBinormals | ) |
Sets this layer's Binormals description.
pBinormals | A pointer to the Binormals layer element, or NULL
to remove the Binormals definition. |
void SetTangents | ( | KFbxLayerElementTangent * | pTangents | ) |
Sets this layer's Tangents description.
pTangents | A pointer to the Tangents layer element, or NULL
to remove the Tangents definition. |
void SetMaterials | ( | KFbxLayerElementMaterial * | pMaterials | ) |
Sets this layer's Materials description.
pMaterials | A pointer to the Materials layer element, or NULL
to remove the Material definition. |
void SetPolygonGroups | ( | KFbxLayerElementPolygonGroup * | 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 | ( | KFbxLayerElementUV * | pUVs, |
KFbxLayerElement::ELayerElementType | pTypeIdentifier =
KFbxLayerElement::eDIFFUSE_TEXTURES |
||
) |
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 | ( | KFbxLayerElementVertexColor * | 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 | ( | KFbxLayerElementSmoothing * | pSmoothing | ) |
Sets this layer's Smoothing description.
pSmoothing | A pointer to the Smoothing layer element, or NULL
to remove the Smoothing definition. |
void SetVertexCrease | ( | KFbxLayerElementCrease * | 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 | ( | KFbxLayerElementCrease * | 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 | ( | KFbxLayerElementHole * | pHole | ) |
Sets this layer's Hole description.
pHole | A pointer to the Hole layer element, or NULL to
remove the Hole definition. |
void SetUserData | ( | KFbxLayerElementUserData * | 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 | ( | KFbxLayerElementVisibility * | pVisibility | ) |
Sets this layer's the visibility.
pVisibility | A pointer to the visibility layer element, or NULL
to remove the visibility. |
void SetLayerElementOfType | ( | KFbxLayerElement * | pLayerElement, |
KFbxLayerElement::ELayerElementType | 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. |
KFbxLayerElement* CreateLayerElementOfType | ( | KFbxLayerElement::ELayerElementType | 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 | ( | KFbxLayer const & | pSrcLayer, |
KFbxSdkManager * | pSdkManager | ||
) |
Clone function.
pSrcLayer | The source layer to be cloned. |
pSdkManager |
bool ContentWriteTo | ( | KFbxStream & | pStream | ) | const |
bool ContentReadFrom | ( | const KFbxStream & | pStream | ) |
virtual int MemoryUsage | ( | ) | const [virtual] |
friend class KFbxLayerContainer
[friend] |
Definition at line 2816 of file kfbxlayer.h.