This reference page is linked to from the following overview topics: FBX SDK 2014.
#include <fbxgeometryconverter.h>
This class provides the functionality to convert geometry nodes attributes (FbxMesh, FbxNurbs and FbxPatch) and mainly focuses on the two major categories: Triangulation and conversion between NURBS and Patches surfaces.
Definition at line 37 of file fbxgeometryconverter.h.
Public Member Functions |
|
| FbxNode * | MergeMeshes (FbxArray< FbxNode * > &pMeshNodes, const char *pNodeName, FbxScene *pScene) |
| Merge multiple meshes to one mesh. |
|
Triangulation Utilities |
|
| bool | Triangulate (FbxScene *pScene, bool pReplace, bool pLegacy=false) |
| Triangulate all node attributes in the scene
that can be triangulated. |
|
| FbxNodeAttribute * | Triangulate (FbxNodeAttribute *pNodeAttribute, bool pReplace, bool pLegacy=false) |
| Triangulate a node attribute, if supported,
and preserve the skins and shapes animation channels. |
|
| bool | ComputeGeometryControlPointsWeightedMapping (FbxGeometry *pSrcGeom, FbxGeometry *pDstGeom, FbxWeightedMapping *pSrcToDstWeightedMapping, bool pSwapUV=false) |
| Compute a "vertex-correspondence" table that
helps passing from source to destination geometry. |
|
| FBX_DEPRECATED FbxMesh * | TriangulateMesh (const FbxMesh *pMesh) |
| Triangulate a basic mesh, without support
for holes. |
|
| FBX_DEPRECATED FbxMesh * | TriangulateMeshAdvance (const FbxMesh *pMesh) |
| Triangulate a mesh with support for simple
holes in polygons. |
|
| FBX_DEPRECATED FbxMesh * | TriangulatePatch (const FbxPatch *pPatch) |
| Triangulate a patch. |
|
| FBX_DEPRECATED FbxMesh * | TriangulateNurbs (const FbxNurbs *pNurbs) |
| Triangulate a nurb. |
|
| FBX_DEPRECATED bool | TriangulateInPlace (FbxNode *pNode) |
| Triangulate the default mesh, patch or nurb
contained in a node and preserve the skins and shapes animation
channels. |
|
Geometry Conversion |
|
| FbxNurbs * | ConvertPatchToNurbs (FbxPatch *pPatch) |
| Convert from patch to nurb. |
|
| bool | ConvertPatchToNurbsInPlace (FbxNode *pNode) |
| Convert a patch contained in a node to a
nurb. |
|
| FbxNurbsSurface * | ConvertPatchToNurbsSurface (FbxPatch *pPatch) |
| Convert a patch to nurb surface. |
|
| bool | ConvertPatchToNurbsSurfaceInPlace (FbxNode *pNode) |
| Convert a patch contained in a node to a
nurb surface. |
|
| FbxNurbsSurface * | ConvertNurbsToNurbsSurface (FbxNurbs *pNurbs) |
| Convert a FbxNurbs to
a FbxNurbsSurface.
|
|
| FbxNurbs * | ConvertNurbsSurfaceToNurbs (FbxNurbsSurface *pNurbs) |
| Convert a FbxNurbsSurface
to a FbxNurbs.
|
|
| bool | ConvertNurbsToNurbsSurfaceInPlace (FbxNode *pNode) |
| Convert a nurb, contained in a node, to a
nurbs surface. |
|
| bool | ConvertNurbsSurfaceToNurbsInPlace (FbxNode *pNode) |
| Convert a nurb contained in a node to a
nurbs surface. |
|
Nurb UV and Links Swapping |
|
| FbxNurbs * | FlipNurbs (FbxNurbs *pNurbs, bool pSwapUV, bool pSwapClusters) |
| Flip UV and/or skin clusters of a nurb.
|
|
| FbxNurbsSurface * | FlipNurbsSurface (FbxNurbsSurface *pNurbs, bool pSwapUV, bool pSwapClusters) |
| Flip UV and/or skin clusters of a nurb
surface. |
|
Normals By Polygon Vertex Emulation |
|
| bool | EmulateNormalsByPolygonVertex (FbxMesh *pMesh) |
| Emulate normals by polygon vertex mode for a
mesh. |
|
| bool | ComputeEdgeSmoothingFromNormals (FbxMesh *pMesh) const |
| Create edge smoothing information from
polygon-vertex mapped normals. |
|
| bool | ComputePolygonSmoothingFromEdgeSmoothing (FbxMesh *pMesh, int pIndex=0) const |
| Convert edge smoothing to polygon smoothing
group. |
|
| bool | ComputeEdgeSmoothingFromPolygonSmoothing (FbxMesh *pMesh, int pIndex=0) const |
| Convert polygon smoothing group to edge
smoothing. |
|
Split Mesh Per Materials |
|
| bool | SplitMeshesPerMaterial (FbxScene *pScene, bool pReplace) |
| Split all the mesh in the scene per
material. |
|
| bool | SplitMeshPerMaterial (FbxMesh *pMesh, bool pReplace) |
| Split mesh per material. |
|
| bool Triangulate | ( | FbxScene * | pScene, |
| bool | pReplace, | ||
| bool | pLegacy =
false |
||
| ) |
Triangulate all node attributes in the scene that can be triangulated.
| pScene | The scene to iterate through to triangulate meshes. |
| pReplace | If true, replace the original meshes with the new
triangulated meshes on all the nodes, and delete the original
meshes. Otherwise, original meshes are left untouched. |
| pLegacy | If true, use legacy triangulation method that does
not support holes in geometry. Provided for backward
compatibility. |
true if all node attributes that can be
triangulated were triangulated successfully.| FbxNodeAttribute* Triangulate | ( | FbxNodeAttribute * | pNodeAttribute, |
| bool | pReplace, | ||
| bool | pLegacy =
false |
||
| ) |
Triangulate a node attribute, if supported, and preserve the skins and shapes animation channels.
| pNodeAttribute | Pointer to the node containing the geometry to triangulate. |
| pReplace | If true, replace the original mesh with the new
triangulated mesh on the nodes, and delete the original mesh.
Otherwise, original mesh is left untouched and only return new
mesh. |
| pLegacy | If true, use legacy triangulation method that does
not support holes in geometry. Provided for backward
compatibility. |
| bool ComputeGeometryControlPointsWeightedMapping | ( | FbxGeometry * | pSrcGeom, |
| FbxGeometry * | pDstGeom, | ||
| FbxWeightedMapping * | pSrcToDstWeightedMapping, | ||
| bool | pSwapUV =
false |
||
| ) |
Compute a "vertex-correspondence" table that helps passing from source to destination geometry.
| pSrcGeom | Pointer to the source geometry. |
| pDstGeom | Pointer to the destination geometry. |
| pSrcToDstWeightedMapping | Pointer to the weighted mapping table. |
| pSwapUV | Set to true to swap UVs. |
true on success, false if the
function fails to compute the correspondence.Triangulate a basic mesh, without support for holes.
| pMesh | Pointer to the mesh to triangulate. |
Triangulate a mesh with support for simple holes in polygons.
| pMesh | Pointer to the mesh to triangulate. |
Triangulate a patch.
| pPatchPointer | to the patch to triangulate. |
Triangulate a nurb.
| pNurbs | Pointer to the nurb to triangulate. |
| FBX_DEPRECATED bool TriangulateInPlace | ( | FbxNode * | pNode | ) |
Triangulate the default mesh, patch or nurb contained in a node and preserve the skins and shapes animation channels.
| pNode | Pointer to the node containing the geometry to triangulate. |
true on success, or false if the node
attribute is not a mesh, a patch or a nurb.Convert from patch to nurb.
| pPatch | Pointer to the patch to convert. |
NULL if the conversion fails.| bool ConvertPatchToNurbsInPlace | ( | FbxNode * | pNode | ) |
Convert a patch contained in a node to a nurb.
Use this function to preserve the patch's skins and shapes animation channels.
| pNode | Pointer to the node containing the patch. |
true on success, false if the node
attribute is not a patch.| FbxNurbsSurface* ConvertPatchToNurbsSurface | ( | FbxPatch * | pPatch | ) |
Convert a patch to nurb surface.
| pPatch | Pointer to the patch to convert. |
NULL if conversion
fails.| bool ConvertPatchToNurbsSurfaceInPlace | ( | FbxNode * | pNode | ) |
Convert a patch contained in a node to a nurb surface.
Use this function to preserve the patch's skins and shapes animation channels.
| pNode | Pointer to the node containing the patch. |
true on success, false if the node
attribute is not a patch.| FbxNurbsSurface* ConvertNurbsToNurbsSurface | ( | FbxNurbs * | pNurbs | ) |
Convert a FbxNurbs to a FbxNurbsSurface.
| pNurbs | Pointer to the original nurb |
| FbxNurbs* ConvertNurbsSurfaceToNurbs | ( | FbxNurbsSurface * | pNurbs | ) |
Convert a FbxNurbsSurface to a FbxNurbs.
| pNurbs | Pointer to the original nurbs surface |
| bool ConvertNurbsToNurbsSurfaceInPlace | ( | FbxNode * | pNode | ) |
Convert a nurb, contained in a node, to a nurbs surface.
Use this function to preserve the nurb's skins and shapes animation channels.
| pNode | Pointer to the node containing the nurb. |
true on success, false otherwise| bool ConvertNurbsSurfaceToNurbsInPlace | ( | FbxNode * | pNode | ) |
Convert a nurb contained in a node to a nurbs surface.
Use this function to preserve the nurb's skins and shapes animation channels.
| pNode | Pointer to the node containing the nurbs surface. |
true on success, false otherwiseFlip UV and/or skin clusters of a nurb.
| pNurbs | Pointer to the Source nurb. |
| pSwapUV | Set to true to swap the UVs. |
| pSwapClusters | Set to true to swap the control point indices of
clusters. |
NULL if the function fails.| FbxNurbsSurface* FlipNurbsSurface | ( | FbxNurbsSurface * | pNurbs, |
| bool | pSwapUV, | ||
| bool | pSwapClusters | ||
| ) |
Flip UV and/or skin clusters of a nurb surface.
| pNurbs | Pointer to the Source nurb surface. |
| pSwapUV | Set to true to swap the UVs. |
| pSwapClusters | Set to true to swap the control point indices of
clusters. |
NULL if the function fails.| bool EmulateNormalsByPolygonVertex | ( | FbxMesh * | pMesh | ) |
Emulate normals by polygon vertex mode for a mesh.
| pMesh | Pointer to the mesh object. |
true on success, false if the number
of normals in the mesh and in its associated shapes don't match the
number of polygon vertices.| bool ComputeEdgeSmoothingFromNormals | ( | FbxMesh * | pMesh | ) | const |
Create edge smoothing information from polygon-vertex mapped normals.
Existing smoothing information is removed and edge data is created if none exists on the mesh.
| pMesh | The mesh used to generate edge smoothing. |
true on success, false
otherwise.| bool ComputePolygonSmoothingFromEdgeSmoothing | ( | FbxMesh * | pMesh, |
| int | pIndex = 0 |
||
| ) | const |
Convert edge smoothing to polygon smoothing group.
Existing smoothing information is replaced.
| pMesh | The mesh that contains the smoothing to be converted. |
| pIndex | The index of the layer smoothing to be converted. |
true on success, false
otherwise.| bool ComputeEdgeSmoothingFromPolygonSmoothing | ( | FbxMesh * | pMesh, |
| int | pIndex = 0 |
||
| ) | const |
Convert polygon smoothing group to edge smoothing.
Existing smoothing information is replaced.
| pMesh | The mesh that contains the smoothing to be converted. |
| pIndex | The index of the layer smoothing to be converted |
true on success, false
otherwise.| bool SplitMeshesPerMaterial | ( | FbxScene * | pScene, |
| bool | pReplace | ||
| ) |
Split all the mesh in the scene per material.
| pScene | The scene to iterate through to split meshes. |
| pReplace | If true, replace the original mesh with new ones
and delete the original meshes, but *only* if they got split into
multiple meshes, otherwise they are left untouched. |
true if all splitable mesh were successfully
split, false otherwise.| bool SplitMeshPerMaterial | ( | FbxMesh * | pMesh, |
| bool | pReplace | ||
| ) |
Split mesh per material.
| pMesh | The mesh that will be split if it has multiple materials assigned. |
| pReplace | If true, replace the original mesh with new one
and delete the original mesh, but *only* if they got split into
multiple meshes, otherwise left untouched. |
true on success, false
otherwise.| FbxNode* MergeMeshes | ( | FbxArray< FbxNode * > & | pMeshNodes, |
| const char * | pNodeName, | ||
| FbxScene * | pScene | ||
| ) |
Merge multiple meshes to one mesh.
The method will merge: a) mesh vertex; b) mesh polygon; c) mesh edge; d) all mesh elements; only the layer 0 elements is merged. e) if there are skins for old mesh, merge these skins. The new skin clusters link to old skeletons.
| pMeshNodes | FBX nodes that hold multiple meshes. These meshes will be merged. |
| pNodeName | Name of new mesh node. |
| pScene | The scene that will contain the new mesh node. |