KFbxMesh Class Reference

#include <kfbxmesh.h>

Inherits KFbxGeometry.

Inherited by MyKFbxMesh.

Inheritance diagram for KFbxMesh:

Inheritance graph
List of all members.

Detailed Description

A mesh is a geometry made of polygons.

Functions to initialize, set and access vertices are provided in the KFbxGeometry base class. A vertex is referred as a control point in the KFbxGeometry base class. Though a control point is made of four elements, meshes only use the first tree to store the XYZ coordinates.

Since the mesh-related terminology of the FBX SDK differs a little from the standard, here are some definitions:

Definition at line 75 of file kfbxmesh.h.

Utility functions

enum  ESplitObject { eBY_NORMAL }
 Object of interest when spliting. More...
typedef KArrayTemplate< KDuplicateVertexKArrayOfDuplicateVertex
 Object of interest when spliting.
void Reset ()
 Reset the mesh to default values.
void ComputeVertexNormals (bool pCW=false)
 Compute the vertex normals on the mesh.
bool CheckIfVertexNormalsCCW ()
 Compares the normals calculated by doing cross-products between the polygon vertex and by the ones stored in the normal array.
bool CheckSamePointTwice ()
 Verify if the mesh has polygons that are defined on the same point more than once.
int RemoveBadPolygons ()
 Remove bad polygons from a mesh.

Polygon Management

void BeginPolygon (int pMaterial=-1, int pTexture=-1, int pGroup=-1, bool pLegacy=true)
 Begin writing a polygon.
void BeginPolygonExt (int pMaterial, int *pTextures)
 Begin writing a polygon.
void AddPolygon (int pIndex, int pTextureUVIndex=-1)
 Add an index to a control point (i.e.
void EndPolygon ()
 End writing a polygon.
int GetPolygonCount ()
 Get the polygon count of this mesh.
int GetPolygonSize (int pPolygonIndex)
 Get the number of polygon vertices in a polygon.
int GetPolygonGroup (int pPolygonIndex)
 Get the group index assigned to a polygon.
int GetPolygonVertex (int pPolygonIndex, int pPositionInPolygon)
 Get a polygon vertex (i.e.
void GetPolygonVertexNormal (int &pPolyIndex, int &pVertexIndex, KFbxVector4 &pNormal)
 Get the normal associated with a polygon/vertex.
int * GetPolygonVertices ()
 Get the array of polygon vertices (i.e.
int GetPolygonVertexCount ()
 Gets the number of polygon vertices in the mesh.
int RemovePolygon (int pPolygonIndex)
 Remove this polygon from the mesh.

Texture UV Utility Functions.

The functions you will find in this section are utility functions to handle UV coordinates quickly. Internaly they refer to KFbxLayer and KFbxLayerElementUV methods to do the work. These functions are only working on Layer 0. Use the KFbxLayer methods directly to access other layers.

void InitTextureUV (int pCount, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Init texture UV coordinates.
void AddTextureUV (KFbxVector2 pUV, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Add texture UV coordinates.
int GetTextureUVCount (KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Get the number of texture UV coordinates.
int GetUVLayerCount ()
 Get the number of layer contianing at least one channel UVMap.
KArrayTemplate< KFbxLayerElement::ELayerElementTypeGetAllChannelUV (int layer)
 Get an array of UV of the different UV set for a layer.
KFbxVector2GetTextureUV (KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Get the array of texture UV coordinates.

Material, Texture and UV Indices Utility Functions.

The functions you will find in this section are utility functions to handle Material, Texture and UV indices. Internaly they refer to KFbxLayer and KFbxLayerElement methods to do the work. These functions are only working on Layer 0. Use the KFbxLayer methods directly to access other layers.

void InitMaterialIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize material indices.
K_DEPRECATED KFbxLayerElement::EMappingMode GetMaterialMappingMode ()
 Get material indices mapping mode.
int * GetMaterialIndices ()
 Get the array of material indices.
void InitEmissiveTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitEmissiveFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitAmbientTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitAmbientFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitDiffuseTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitDiffuseFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitSpecularTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitSpecularFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitShininessTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitBumpTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitNormalMapTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitTransparentTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitTransparencyFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitReflectionTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
void InitReflectionFactorTexturesIndices (KFbxLayerElement::EMappingMode pMappingMode)
 Initialize texture indices.
K_DEPRECATED KFbxLayerElement::EMappingMode GetEmissiveTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetEmissiveFactorTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetAmbientTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetAmbientFactorTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetDiffuseTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetDiffuseFactorTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetSpecularTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetSpecularFactorTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetShininessTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetBumpTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetTransparentTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetTransparencyFactorTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetReflectionTexturesMappingMode ()
 Get texture indices mapping mode.
K_DEPRECATED KFbxLayerElement::EMappingMode GetReflectionFactorTexturesMappingMode ()
 Get texture indices mapping mode.
int * GetEmissiveTexturesIndices ()
 Get the array of texture indices.
int * GetEmissiveFactorTexturesIndices ()
 Get the array of texture indices.
int * GetAmbientTexturesIndices ()
 Get the array of texture indices.
int * GetAmbientFactorTexturesIndices ()
 Get the array of texture indices.
int * GetDiffuseTexturesIndices ()
 Get the array of texture indices.
int * GetDiffuseFactorTexturesIndices ()
 Get the array of texture indices.
int * GetSpecularTexturesIndices ()
 Get the array of texture indices.
int * GetSpecularFactorTexturesIndices ()
 Get the array of texture indices.
int * GetShininessTexturesIndices ()
 Get the array of texture indices.
int * GetBumpTexturesIndices ()
 Get the array of texture indices.
int * GetTransparentTexturesIndices ()
 Get the array of texture indices.
int * GetTransparencyFactorTexturesIndices ()
 Get the array of texture indices.
int * GetReflectionTexturesIndices ()
 Get the array of texture indices.
int * GetReflectionFactorTexturesIndices ()
 Get the array of texture indices.
int * GetTexturesIndices (KFbxLayerElement::ELayerElementType pTextureType)
 Get the array of texture indices.
void InitTextureUVIndices (KFbxLayerElement::EMappingMode pMappingMode, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Initialize texture UV indices.
K_DEPRECATED KFbxLayerElement::EMappingMode GetTextureUVMappingMode (KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Get texture UV indices mapping mode.
int GetTextureUVIndex (int pPolygonIndex, int pPositionInPolygon, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Get a texture UV index associated with a polygon vertex (i.e.
void SetTextureUVIndex (int pPolygonIndex, int pPositionInPolygon, int pIndex, KFbxLayerElement::ELayerElementType pTypeIdentifier)
 Set a texture UV index associated with a polygon vertex (i.e.
K_DEPRECATED KFbxLayerElement::EMappingMode GetNormalsMappingMode ()
 Get the normal mapping mode.
K_DEPRECATED void SetNormalsMappingMode (KFbxLayerElement::EMappingMode pMappingMode)
 Set the normal mapping mode.

Point Spliting/Merging utility functions

void BuildSplitList (KArrayTemplate< KArrayOfDuplicateVertex * > &pSplitList, ESplitObject pObject)
 Insert the DuplicateVertex information in the pSplitList for the points that have to be splited depending on pObject value.
void SplitPointsForHardEdge (KArrayTemplate< KArrayOfDuplicateVertex * > &pSplitList, KFbxLayerElement::ELayerElementType pTypeIdentifier=KFbxLayerElement::eDIFFUSE_TEXTURES)
 Split the points specified in the list.
bool BuildMergeList (KArrayTemplate< int > &pMergeList, ESplitObject pObject, bool pExport=false)
 Insert the new indexes of the object that have to be merged.
void MergePointsForPolygonVerteNormals (KArrayTemplate< int > &pMergeList)
 Merge the points specified in the list.

Edge management functions

void BuildMeshEdgeArray ()
 Automatically generate edge data for the mesh.
int GetMeshEdgeCount ()
 Query the number of edges defined on this mesh.
int GetMeshEdgeIndex (int pStartVertexIndex, int pEndVertexIndex, bool &pReversed)
 Get the index for the edge between the given vertices.
int GetMeshEdgeIndexForPolygon (int pPolygon, int pPositionInPolygon)
 Automatically generate edge data for the mesh.
void GetMeshEdgeVertices (int pEdgeIndex, int &pStartVertexIndex, int &pEndVertexIndex)
 Get the vertices for the given edge.
void BeginGetMeshEdgeVertices ()
 Use this method in before calling GetMeshEdgeVertices if making several calls to that method.
void EndGetMeshEdgeVertices ()
 Automatically generate edge data for the mesh.
void SetMeshEdgeCount (int pEdgeCount)
 Presets the number edge data elements.
void SetMeshEdge (int pEdgeIndex, int pValue)
 Sets element in edge array to specific value.
int AddMeshEdgeIndex (int pStartVertexIndex, int pEndVertexIndex, bool pCheckForDuplicates)
 Add an edge with the given start/end points.
int SetMeshEdgeIndex (int pEdgeIndex, int pStartVertexIndex, int pEndVertexIndex, bool pCheckForDuplicates)
 Automatically generate edge data for the mesh.
void BeginAddMeshEdgeIndex ()
 Call this before calling AddMeshEdgeIndex or SetMeshEdgeIndex to increase peformance.
void EndAddMeshEdgeIndex ()
 See BeginAddMeshEdgeIndex.
int AddMeshEdgeIndexForPolygon (int pPolygonIndex, int pPositionInPolygon)
 Adds an edge for the specified polygon, and edge number within the polygon see SetMeshEdgeIndex for notes the the parameters.
bool SetMeshEdgeIndex (int pEdgeIndex, int pPolygonIndex, int pPositionInPolygon)
 Sets the specified edge to the specified polygon's edge.
void ComputeComponentMaps (KFbxComponentMap &pEdgeToPolyMap, KFbxComponentMap &pPolyToEdgeMap)
 Automatically generate edge data for the mesh.
bool IsTriangleMesh () const
 Determines if the mesh is composed entirely of triangles.

Public Member Functions

virtual EAttributeType GetAttributeType () const
 Return the type of node attribute.

Classes

class  KDuplicateVertex
 Internal structure used to keep the duplicate vertex information. More...
struct  KFbxComponentMap
class  KVertexNormalInfo
 Internal structure used to compute the normals on a mesh. More...


Member Typedef Documentation

Object of interest when spliting.

Definition at line 826 of file kfbxmesh.h.


Member Enumeration Documentation

Object of interest when spliting.

Enumerator:
eBY_NORMAL  Each splited point will have a different normal for polygon/vertex.

This is for normal mapping emulation.

Definition at line 787 of file kfbxmesh.h.


Member Function Documentation

virtual EAttributeType GetAttributeType (  )  const [virtual]

Return the type of node attribute.

Returns:
Return the type of this node attribute which is EAttributeType::eMESH.

Reimplemented from KFbxGeometry.

void BeginPolygon ( int  pMaterial = -1,
int  pTexture = -1,
int  pGroup = -1,
bool  pLegacy = true 
)

Begin writing a polygon.

Parameters:
pMaterial Index of material to assign to this polygon if material mapping type is eBY_POLYGON. Otherwise it must be -1.
pTexture Index of texture to assign to this polygon if texture mapping type is eBY_POLYGON. Otherwise it must be -1.
pGroup Group index assigned to polygon.
pLegacy When set to true, automatically create a LayerElement of type Texture; this was the old behavior.

void BeginPolygonExt ( int  pMaterial,
int *  pTextures 
)

Begin writing a polygon.

Parameters:
pMaterial Index of material to assign to this polygon if material mapping type is eBY_POLYGON. Otherwise it must be -1.
pTexture Array of index of texture to assign to this polygon if texture mapping type is eBY_POLYGON. Otherwise it must be an array of -1.

void AddPolygon ( int  pIndex,
int  pTextureUVIndex = -1 
)

Add an index to a control point (i.e.

a polygon vertex) to the current polygon.

Parameters:
pIndex Index to a control point (i.e. a polygon vertex).
pTextureUVIndex Index of texture UV coordinates to assign to this polygon if texture UV mapping type is eBY_POLYGON_VERTEX. Otherwise it must be -1.

void EndPolygon (  ) 

End writing a polygon.

int GetPolygonCount (  ) 

Get the polygon count of this mesh.

Returns:
Return the number of polygons in the mesh.

int GetPolygonSize ( int  pPolygonIndex  ) 

Get the number of polygon vertices in a polygon.

Parameters:
pPolygonIndex Index of the polygon.
Returns:
The number of polygon vertices in the indexed polygon. If the polygon index is out of bounds, return -1.

int GetPolygonGroup ( int  pPolygonIndex  ) 

Get the group index assigned to a polygon.

Parameters:
pPolygonIndex Index of the polygon.
Returns:
Group index assigned to a polygon. If the polygon index is out of bounds, return -1.

int GetPolygonVertex ( int  pPolygonIndex,
int  pPositionInPolygon 
)

Get a polygon vertex (i.e.

an index to a control point).

Parameters:
pPolygonIndex Index of polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonCount().
pPositionInPolygon Position of polygon vertex in indexed polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonSize(pPolygonIndex).
Returns:
Return the polygon vertex indexed or -1 if the requested vertex does not exists.

void GetPolygonVertexNormal ( int &  pPolyIndex,
int &  pVertexIndex,
KFbxVector4 pNormal 
)

Get the normal associated with a polygon/vertex.

Parameters:
pPolyIndex Index of the polygon.
pVertexIndex Index of the vertex in the polygon space.
pNormal The returned normal.
Remarks:
pNormal remain unchanged if the requested vertex does not exists.

int* GetPolygonVertices (  ) 

Get the array of polygon vertices (i.e.

index to control points). This array is a concatenation of the list of polygon vertices of all the polygons. Example: a mesh made of 2 triangles [1,2,3] and [2,3,4] results in [1,2,3,2,3,4]. The first polygon starts at position 0 and the second at position 3.

int GetPolygonVertexCount (  ) 

Gets the number of polygon vertices in the mesh.

int RemovePolygon ( int  pPolygonIndex  ) 

Remove this polygon from the mesh.

Update layers accordingly.

Parameters:
pPolygonIndex Index of the polygon.
Returns:
Polygon index. If the polygon index is out of bounds, return -1.

void InitTextureUV ( int  pCount,
KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES 
)

Init texture UV coordinates.

Parameters:
pCount Number of texture UV elements.
Remarks:
pCount must equal the number of control points of the Mesh if the UV mapping mode is KFbxLayerElement::eBY_CONTROL_POINT.

void AddTextureUV ( KFbxVector2  pUV,
KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES 
)

Add texture UV coordinates.

Appends a new element at the end of the array of texture UV coordinates.

Parameters:
pUV Texture UV coordinates, ranging between 0 and 1.
Remarks:
The final number of texture UV elements must equal the number of control points if the UV mapping mode is KFbxLayerElement::eBY_CONTROL_POINT.

int GetTextureUVCount ( KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES  ) 

Get the number of texture UV coordinates.

Parameters:
lalyer Index of the layer.

int GetUVLayerCount (  ) 

Get the number of layer contianing at least one channel UVMap.

Parameters:
lalyer Index of the layer.

KArrayTemplate<KFbxLayerElement::ELayerElementType> GetAllChannelUV ( int  layer  ) 

Get an array of UV of the different UV set for a layer.

Parameters:
lalyer Index of the layer.

KFbxVector2* GetTextureUV ( KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES  ) 

Get the array of texture UV coordinates.

Returns:
Pointer to array of texture UV coordinates or NULL if the array hasn't been allocated.

void InitMaterialIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize material indices.

Parameters:
pMappingMode The mapping mode. This function must be called after function KFbxGeometryBase::InitControlPoints(). The material indices refer to the position of a material in the KFbxLayerElementMaterial's direct array. See KFbxLayerElementMaterial for more details. Supported mapping types are eBY_CONTROL_POINT, eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_CONTROL_POINT, there will be as many indices in the material index array as there are control points.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the material index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the material index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementMaterial on layer 0 to eINDEX_TO_DIRECT.

K_DEPRECATED KFbxLayerElement::EMappingMode GetMaterialMappingMode (  ) 

Get material indices mapping mode.

Returns:
The mapping mode for the Material Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

int* GetMaterialIndices (  ) 

Get the array of material indices.

Returns:
Pointer to array of material indices or NULL. The function will return NULL in the following cases:
  • There is no Material Layer Element (KFbxLayerElementMaterial) on Layer 0.
  • There is a Material Layer Element, but the reference mode is eDIRECT.

void InitEmissiveTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitEmissiveFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitAmbientTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitAmbientFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitDiffuseTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitDiffuseFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitSpecularTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitSpecularFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitShininessTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitBumpTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitNormalMapTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitTransparentTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitTransparencyFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitReflectionTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

void InitReflectionFactorTexturesIndices ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Initialize texture indices.

Parameters:
pMappingMode The mapping mode. The texture indices refer to the position of a texture in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping modes are eBY_POLYGON and eALL_SAME.
  • If mapping mode is eBY_POLYGON, there will be as many indices in the texture index array as there are polygons in the mesh.
  • If mapping mode is eALL_SAME, there will be only one index in the texture index array.
Remarks:
This function will set the Reference mode of the KFbxLayerElementTexture on layer 0 to eINDEX_TO_DIRECT.

K_DEPRECATED KFbxLayerElement::EMappingMode GetEmissiveTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetEmissiveFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetAmbientTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetAmbientFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetDiffuseTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetDiffuseFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetSpecularTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetSpecularFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetShininessTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetBumpTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetTransparentTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetTransparencyFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetReflectionTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED KFbxLayerElement::EMappingMode GetReflectionFactorTexturesMappingMode (  ) 

Get texture indices mapping mode.

Returns:
The mapping mode for the Texture Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

int* GetEmissiveTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetEmissiveFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetAmbientTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetAmbientFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetDiffuseTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetDiffuseFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetSpecularTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetSpecularFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetShininessTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetBumpTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetTransparentTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetTransparencyFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetReflectionTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetReflectionFactorTexturesIndices (  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

int* GetTexturesIndices ( KFbxLayerElement::ELayerElementType  pTextureType  ) 

Get the array of texture indices.

Returns:
Pointer to array of texture indices or NULL. The function will return NULL in the following cases:
  • There is no Texture Layer Element (KFbxLayerElementTexture) on Layer 0.
  • There is a Texture Layer Element, but the reference mode is eDIRECT.

void InitTextureUVIndices ( KFbxLayerElement::EMappingMode  pMappingMode,
KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES 
)

Initialize texture UV indices.

Parameters:
pMappingMode The mapping mode. The texture UV indices refer to the index of an element in the KFbxLayerElementTexture's direct array. See KFbxLayerElementTexture for more details. Supported mapping types are eBY_CONTROL_POINT , eBY_POLYGON_VERTEX and eALL_SAME.
  • If mapping mode is eBY_CONTROL_POINT, there will be as many indices in the UV index array as there are control points. This will also set the Reference mode of the KFbxLayerElementUV on layer 0 to eDIRECT.
  • If mapping mode is eBY_POLYGON_VERTEX, there will be an index in the UV index array for each vertex, for each polygon it is part of. This will also set the Reference mode of the KFbxLayerElementUV on layer 0 to eINDEX_TO_DIRECT.
  • If mapping mode is eALL_SAME, there will be no index in the UV index array. This will also set the Reference mode of the KFbxLayerElementUV on layer 0 to eDIRECT.

K_DEPRECATED KFbxLayerElement::EMappingMode GetTextureUVMappingMode ( KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES  ) 

Get texture UV indices mapping mode.

Returns:
The mapping mode for the UV Layer Element on Layer 0, or eNONE if no mapping is defined.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

int GetTextureUVIndex ( int  pPolygonIndex,
int  pPositionInPolygon,
KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES 
)

Get a texture UV index associated with a polygon vertex (i.e.

an index to a control point).

Parameters:
pPolygonIndex Index of polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonCount().
pPositionInPolygon Position of polygon vertex in indexed polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonSize(pPolygonIndex).
Returns:
Return a texture UV index.
Remarks:
This function only works if the texture UV mapping mode is set to eBY_POLYGON_VERTEX, otherwise it returns -1.

void SetTextureUVIndex ( int  pPolygonIndex,
int  pPositionInPolygon,
int  pIndex,
KFbxLayerElement::ELayerElementType  pTypeIdentifier 
)

Set a texture UV index associated with a polygon vertex (i.e.

an index to a control point).

Parameters:
pPolygonIndex Index of polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonCount().
pPositionInPolygon Position of polygon vertex in indexed polygon. The valid range for this parameter is 0 to KFbxMesh::GetPolygonSize(pPolygonIndex).
pIndex The index of the texture UV we want to assign to the polygon vertex.
Remarks:
This function only works if the texture UV mapping type is set to eBY_POLYGON_VERTEX.

K_DEPRECATED KFbxLayerElement::EMappingMode GetNormalsMappingMode (  ) 

Get the normal mapping mode.

Returns:
The mapping mode for the Normal Layer Element on Layer 0. Supported mapping types are eBY_POLYGON_VERTEX and eBY_CONTROL_POINT.
This function has been deprecated. Please use KFbxLayerElement::GetMappingMode() instead.

K_DEPRECATED void SetNormalsMappingMode ( KFbxLayerElement::EMappingMode  pMappingMode  ) 

Set the normal mapping mode.

Parameters:
pMappingMode The mapping mode. Supported mapping modes are eBY_POLYGON_VERTEX and eBY_CONTROL_POINT.
This function has been deprecated. Please use KFbxLayerElement::SetMappingMode() instead.

void Reset (  ) 

Reset the mesh to default values.

Frees and set to NULL all layers and clear the polygon and the control point array.

void ComputeVertexNormals ( bool  pCW = false  ) 

Compute the vertex normals on the mesh.

The normals are per vertex and are the average of all the polygon normals associated with each vertex.

Parameters:
pCW True if the normals are calculated clockwise, false otherwise (counter-clockwise).

bool CheckIfVertexNormalsCCW (  ) 

Compares the normals calculated by doing cross-products between the polygon vertex and by the ones stored in the normal array.

Returns:
false if ALL of them are Clockwise. Returns true otherwise.

bool CheckSamePointTwice (  ) 

Verify if the mesh has polygons that are defined on the same point more than once.

Returns:
true if the mesh has that kind of polygon, false otherwise.

int RemoveBadPolygons (  ) 

Remove bad polygons from a mesh.

Degenerate polygons use a vertex more than once. Remove them from the mesh and from the layer element indices as needed.

Parameters:
pMesh Pointer to the mesh object.
Returns:
Number of polygons removed from the mesh, -1 if an error occured.

void BuildSplitList ( KArrayTemplate< KArrayOfDuplicateVertex * > &  pSplitList,
ESplitObject  pObject 
)

Insert the DuplicateVertex information in the pSplitList for the points that have to be splited depending on pObject value.

Parameters:
pSlitList The list containing the KDuplicateVertex information of the points that will be splited.
pObject The object of interest of the split.

void SplitPointsForHardEdge ( KArrayTemplate< KArrayOfDuplicateVertex * > &  pSplitList,
KFbxLayerElement::ELayerElementType  pTypeIdentifier = KFbxLayerElement::eDIFFUSE_TEXTURES 
)

Split the points specified in the list.

Parameters:
pSplitList The List containing the information on the points that will be splited.

bool BuildMergeList ( KArrayTemplate< int > &  pMergeList,
ESplitObject  pObject,
bool  pExport = false 
)

Insert the new indexes of the object that have to be merged.

Parameters:
pMergeList The list that will contain the indexes of the objects to merge.
pObject The object of interest of the merge.
pExport If set to true, include the duplicate indexes in the merge list.

void MergePointsForPolygonVerteNormals ( KArrayTemplate< int > &  pMergeList  ) 

Merge the points specified in the list.

Parameters:
pMergeList list containing the information on the points that will be merge

void BuildMeshEdgeArray (  ) 

Automatically generate edge data for the mesh.

Clears all previously stored edge information

int GetMeshEdgeCount (  ) 

Query the number of edges defined on this mesh.

Returns:
The number of edges defined for this mesh

int GetMeshEdgeIndex ( int  pStartVertexIndex,
int  pEndVertexIndex,
bool &  pReversed 
)

Get the index for the edge between the given vertices.

Note that the result of this method is the same if pStartVertexIndex and pEndVertexIndex are swapped.

Parameters:
pStartVertexIndex The starting point of the edge
pEndVertexIndex The ending point of the edge
pReversed flag will be set to true if the reverse edge is found, false otherwise
Returns:
-1 if no edge exists for the given pair of vertices

int GetMeshEdgeIndexForPolygon ( int  pPolygon,
int  pPositionInPolygon 
)

Automatically generate edge data for the mesh.

Clears all previously stored edge information

void GetMeshEdgeVertices ( int  pEdgeIndex,
int &  pStartVertexIndex,
int &  pEndVertexIndex 
)

Get the vertices for the given edge.

Note that the values returned are indices into the control point array.

Parameters:
pEdgeIndex The edge to query
pStartVertexIndex The edge's starting point will be stored here
pEndVertexIndex The edge's starting point will be stored here

void BeginGetMeshEdgeVertices (  ) 

Use this method in before calling GetMeshEdgeVertices if making several calls to that method.

Once done calling that method, call EndGetMeshEdgeVertices. This will optimize access time. Do not modify the mesh inbetween calls to BeginGetMeshEdgeVertices and EndGetMeshEdgeVertices.

void EndGetMeshEdgeVertices (  ) 

Automatically generate edge data for the mesh.

Clears all previously stored edge information

void SetMeshEdgeCount ( int  pEdgeCount  ) 

Presets the number edge data elements.

Parameters:
pEdgeCount The number of edges to allocate

void SetMeshEdge ( int  pEdgeIndex,
int  pValue 
)

Sets element in edge array to specific value.

Parameters:
pEdgeIndex The edge index
pValue The edge data

int AddMeshEdgeIndex ( int  pStartVertexIndex,
int  pEndVertexIndex,
bool  pCheckForDuplicates 
)

Add an edge with the given start/end points.

Note that the inserted edge may start at the given end point, and end at the given start point.

Parameters:
pStartVertexIndex The starting point of the edge
pEndVertexIndex The ending point of the edge.
pCheckForDuplicates Set to true to check if the mesh already contains an edge with these two points. Can be set to false to speed up this method, when the incoming edges are known to be consistent.
Returns:
Edge index of the new edge, or -1 on failure (edge/reverse edge already exists, no face using these 2 points consecutively )

int SetMeshEdgeIndex ( int  pEdgeIndex,
int  pStartVertexIndex,
int  pEndVertexIndex,
bool  pCheckForDuplicates 
)

Automatically generate edge data for the mesh.

Clears all previously stored edge information

void BeginAddMeshEdgeIndex (  ) 

Call this before calling AddMeshEdgeIndex or SetMeshEdgeIndex to increase peformance.

Once finished adding/setting edges EndAddMeshEdgeIndex should be called.

void EndAddMeshEdgeIndex (  ) 

See BeginAddMeshEdgeIndex.

int AddMeshEdgeIndexForPolygon ( int  pPolygonIndex,
int  pPositionInPolygon 
)

Adds an edge for the specified polygon, and edge number within the polygon see SetMeshEdgeIndex for notes the the parameters.

Parameters:
pPolygonIndex The polygon
pPositionInPolygon The edge within the polygon
Returns:
edge id or -1 if failed.

bool SetMeshEdgeIndex ( int  pEdgeIndex,
int  pPolygonIndex,
int  pPositionInPolygon 
)

Sets the specified edge to the specified polygon's edge.

Note that the position in polygon ranges from 0 to GetPolygonSize(pPolygonindex) - 1 and represents the edge from GetPolygonVertex(pPolygonIndex, pPositionInPolygon) to GetPolygonVertex( pPolygonIndex, pPositionInPolygon + 1 ) or from pPositionInPolygon to 0 if pPositionInPolygon == GetPolygonSize(pPolygonindex) - 1

Parameters:
pEdgeIndex The edge
pPolygonIndex The polygon
pPositionInPolygon The specific edge number in the polygon
Returns:
true on success, false on failure. ( edge for the poly and position already exists )

void ComputeComponentMaps ( KFbxComponentMap pEdgeToPolyMap,
KFbxComponentMap pPolyToEdgeMap 
)

Automatically generate edge data for the mesh.

Clears all previously stored edge information

bool IsTriangleMesh (  )  const

Determines if the mesh is composed entirely of triangles.

Returns:
true if all polygons are triangles, false otherwise