#include <kfbxlayer.h>
A layer can contain one or more of the following layer elements:
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 Textures and 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.
You can achieve texture layering when you define more than one layer that contains Textures and UV elements. For example, a Mesh may have only Textures and corresponding UV elements on Layer 0 to create the primary effect, and then another set of Textures and UVs on Layer 1. The way of the texture blending is defined in the Texture layer element.
Normally, you can access layer from KFbxLayerContainer like KFbxGeometry. For example, KFbxLayer *lLayer0 = lGeometry->GetLayer(0);
Definition at line 2301 of file kfbxlayer.h.
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. |
|
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. |
KFbxLayerElementNormal* GetNormals | ( | ) |
KFbxLayerElementNormal const* GetNormals | ( | ) | const |
KFbxLayerElementTangent* GetTangents | ( | ) |
KFbxLayerElementTangent const* GetTangents | ( | ) | const |
KFbxLayerElementBinormal* GetBinormals | ( | ) |
KFbxLayerElementBinormal const* GetBinormals | ( | ) | const |
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 | ( | ) |
KFbxLayerElementVertexColor const* GetVertexColors | ( | ) | const |
KFbxLayerElementSmoothing* GetSmoothing | ( | ) |
KFbxLayerElementSmoothing const* GetSmoothing | ( | ) | const |
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 | ) |
void SetBinormals | ( | KFbxLayerElementBinormal * | pBinormals | ) |
void SetTangents | ( | KFbxLayerElementTangent * | pTangents | ) |
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 | ) |
void SetSmoothing | ( | KFbxLayerElementSmoothing * | pSmoothing | ) |
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. |
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 |