KFbxLayerContainer Class Reference

#include <kfbxlayercontainer.h>

Inherits KFbxNodeAttribute.

Inherited by KFbxGeometryBase.

Inheritance diagram for KFbxLayerContainer:

Inheritance graph
List of all members.

Detailed Description

KFbxLayerContainer is the base class for managing Layers.

This class manages the creation and destruction of layers. A Layer contains Layer Element(s) of the following types:

Definition at line 75 of file kfbxlayercontainer.h.

Layer Management

int CreateLayer ()
 Create a new layer on top of existing layers.
void ClearLayers ()
 Delete all layers.
int GetLayerCount () const
 Get number of layers.
int GetLayerCount (KFbxLayerElement::ELayerElementType pType, bool pUVCount=false) const
 Get number of layers containing the specified layer element type.
KFbxLayerGetLayer (int pIndex)
 Get the layer at given index.
KFbxLayer const * GetLayer (int pIndex) const
 Get the layer at given index.
KFbxLayerGetLayer (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false)
 Get the n'th layer containing the specified layer element type.
KFbxLayer const * GetLayer (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const
 Get the n'th layer containing the specified layer element type.
int GetLayerIndex (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const
 Get the index of n'th layer containing the specified layer element type.
int GetLayerTypedIndex (int pGlobalIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false)
 Convert the global index of the layer to a type-specific index.

Public Member Functions

virtual EAttributeType GetAttributeType () const
 Return the type of node attribute.
bool ConvertDirectToIndexToDirect (int pLayer)
 Convert Direct to Index to Direct Reference Mode.


Member Function Documentation

virtual EAttributeType GetAttributeType (  )  const [inline, virtual]

Return the type of node attribute.

This class is pure virtual.

Reimplemented from KFbxNodeAttribute.

Reimplemented in KFbxGeometry, KFbxMesh, KFbxNurb, KFbxNurbsCurve, KFbxNurbsSurface, KFbxPatch, KFbxBoundary, and KFbxTrimNurbsSurface.

Definition at line 83 of file kfbxlayercontainer.h.

int CreateLayer (  ) 

Create a new layer on top of existing layers.

Returns:
Index of created layer or -1 if an error occured.

void ClearLayers (  ) 

Delete all layers.

int GetLayerCount (  )  const

Get number of layers.

Returns:
Return the number of layers.

int GetLayerCount ( KFbxLayerElement::ELayerElementType  pType,
bool  pUVCount = false 
) const

Get number of layers containing the specified layer element type.

Parameters:
pType The requested Layer Element type.
pUVCount When true, request the number of UV layers connected to the specified Layer Element type.
Returns:
The number of layers containing a layer of type pType.

KFbxLayer* GetLayer ( int  pIndex  ) 

Get the layer at given index.

Parameters:
pIndex Layer index.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

KFbxLayer const* GetLayer ( int  pIndex  )  const

Get the layer at given index.

Parameters:
pIndex Layer index.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

KFbxLayer* GetLayer ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false 
)

Get the n'th layer containing the specified layer element type.

Parameters:
pIndex Layer index.
pType Layer element type.
pIsUV When true, request the UV LayerElement connected to the specified Layer Element type.
Returns:
Pointer to the layer, or NULL if pIndex is out of range for the specified type (pType).

KFbxLayer const* GetLayer ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false 
) const

Get the n'th layer containing the specified layer element type.

Parameters:
pIndex Layer index.
pType Layer element type.
pIsUV When true request the UV LayerElement connected to the specified Layer Element type.
Returns:
Pointer to the layer, or NULL if pIndex is out of range for the specified type (pType).

int GetLayerIndex ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false 
) const

Get the index of n'th layer containing the specified layer element type.

Parameters:
pIndex Layer index of the specified type.
pType Layer type.
pIsUV When true request the index of the UV LayerElement connected to the specified Layer Element type.
Returns:
Index of the specified layer type, or -1 if the layer is not found.
Remarks:
The returned index is the position of the layer in the global array of layers. You can use the returned index to call GetLayer(int pIndex).

int GetLayerTypedIndex ( int  pGlobalIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false 
)

Convert the global index of the layer to a type-specific index.

Parameters:
pGlobalIndex The index of the layer in the global array of layers.
pType The type uppon which the typed index will be returned.
pIsUV When true request the index of the UV LayerElement connected to the specified Layer Element type.
Returns:
Index of the requested layer element type, or -1 if the layer element type is not found.

bool ConvertDirectToIndexToDirect ( int  pLayer  ) 

Convert Direct to Index to Direct Reference Mode.

Parameters:
pLayer The Layer to convert.
Returns:
true if conversion was successful, or false otherwise.