- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

# FbxGeometry Class Reference

This reference page is linked to from the following overview topics: Geometry, Meshes, List of Python Fbx classes.

Search for all occurrences

## Detailed Description

The base class of geometric objects that support control point deformations (e.g.

FbxMesh, FbxNurbs, and FbxPatch). The FbxGeometry provides support for the following kinds of deformations.

- Skin deformation deformers
- Vertex cache deformers
- Geometry weighted maps
- Shapes

Most of the methods of FbxGeometry are wrappers to simplify the access/manipulation of the connections to the deformers. For example, calling the GetDeformerCount() method is the same thing as calling:

     geometry.GetSrcObjectCount(FbxDeformer::ClassId)

Examples:

  ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayLink.cxx, ImportScene/DisplayLink.h, ImportScene/DisplayMaterial.cxx, ImportScene/DisplayMaterial.h, ImportScene/DisplayShape.cxx, ImportScene/DisplayShape.h, ImportScene/DisplayTexture.cxx, and ImportScene/DisplayTexture.h.

Definition at line 57 of file fbxgeometry.h.

`#include <fbxgeometry.h>`

Inheritance diagram for FbxGeometry:
[legend]

List of all members.

## Public Types
enum | ESurfaceMode { eRaw, eLowNoNormals, eLow, eHighNoNormals, eHigh }
| NURBS and Patches surface modes. More...
## Public Member Functions
virtual FbxNodeAttribute::EType | GetAttributeType () const
| Returns the node attribute type.
virtual FbxObject & | Copy (const FbxObject &pObject)
| Copy an object content into this object.
void | CleanShapeChannels (FbxAnimLayer *pAnimLayer)
| Rename the shapes from the old MotionBuilder 4.01 format to the new one.
void | CleanShapeChannel (FbxAnimLayer *pAnimLayer, int pShapeIndex)
| Rename the shapes from the old MotionBuilder 4.01 format to the new one.
void | CreateShapeChannelProperties (FbxString &pShapeName)
void | ConvertShapeNamesToV5Format (FbxString pTakeNodeName)
void | ConvertShapeNamesToV5Format (FbxString pTakeNodeName, int pShapeIndex)
void | RevertShapeNamesToV6Format (FbxString pTakeNodeName)
void | RevertShapeNamesToV6Format (FbxString pTakeNodeName, int pShapeIndex)
void | ClearTemporaryShapeNames ()
Deformer Management
int | AddDeformer (FbxDeformer *pDeformer)
| Adds a deformer to this geometry (as mentioned in the description of this class, adding a deformer is a synonym for "connect a deformer").
FbxDeformer * | RemoveDeformer (int pIndex)
| Remove a deformer.
int | GetDeformerCount () const
| Returns the number of deformers.
FbxDeformer * | GetDeformer (int pIndex) const
| Returns the deformer at the specified index.
int | GetDeformerCount (FbxDeformer::EDeformerType pType) const
| Returns the number of deformers of a specified type.
FbxDeformer * | GetDeformer (int pIndex, FbxDeformer::EDeformerType pType) const
| Returns the deformer of a specified type at the specified index.
Geometry Weighted Maps Management
FbxGeometryWeightedMap * | GetSourceGeometryWeightedMap ()
| Returns the source geometry weighted map that is connected to this geometry.
int | GetDestinationGeometryWeightedMapCount () const
| Returns the number of destination geometry weighted map(s) that are connected to this geometry.
FbxGeometryWeightedMap * | GetDestinationGeometryWeightedMap (int pIndex)
| Returns the destination geometry weighted map at a specified index.
Shape Management
bool | AddShape (int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape *pShape, double pPercent=100)
| Add a shape to the specified blend shape deformer and blend shape channel of this geometry.
void | ClearShape ()
| Removes all the shapes without destroying them.
int | GetShapeCount () const
| Returns the number of shapes.
int | GetShapeCount (int pBlendShapeIndex, int pBlendShapeChannelIndex) const
| Returns the number of shapes.
FbxShape * | GetShape (int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex)
| Returns the shape found at the specified index on a blend shape channel of a blend shape deformer.
FbxShape const * | GetShape (int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex) const
| Returns the shape found at the specified index on a blend shape channel of a blend shape deformer.
FbxAnimCurve * | GetShapeChannel (int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxAnimLayer *pLayer, bool pCreateAsNeeded=false)
| Get the shape animation curve.
Pivot Management
The geometry pivot is used to specify additional translation, rotation, and scaling information applied to all control points when the model is exported.
FbxAMatrix & | GetPivot (FbxAMatrix &pXMatrix) const
| Returns the pivot matrix.
void | SetPivot (FbxAMatrix &pXMatrix)
| Sets the pivot matrix.
void | ApplyPivot ()
| Applies the pivot matrix to all vertices/normals of the geometry.
Default Animation Values
These functions provides direct access to default animation values that are specific to a geometry. These functions only work if the geometry has been associated with a node.
void | SetDefaultShape (int pBlendShapeIndex, int pBlendShapeChannelIndex, double pPercent)
| Sets the default deformation for a specified shape.
void | SetDefaultShape (FbxBlendShapeChannel *pBlendShapeChannel, double pPercent)
| Sets the default deformation for a specified shape.
double | GetDefaultShape (int pBlendShapeIndex, int pBlendShapeChannelIndex) const
| Returns the default deformation value for the specified shape.
double | GetDefaultShape (FbxBlendShapeChannel *pBlendShapeChannel) const
| Returns the default deformation value for the specified shape.
## Protected Member Functions
| FbxGeometry (FbxManager &pManager, char const *pName)
virtual void | Destruct (bool pRecursive, bool pDependents)
virtual void | SetDocument (FbxDocument *pDocument)
FbxString | CreateShapeChannelName (int pShapeIndex)
FbxString | CreateShapeChannelName (FbxString pShapeName)
void | CopyDeformers (FbxGeometry const *pGeometry)
void | CopyPivot (FbxGeometry const *pSource)
## Protected Attributes
FbxArray< FbxString * > | mShapeNameArrayV6
FbxArray< FbxString * > | mShapeNameArrayV5
FbxArray< FbxString * > | mShapeChannelNameArrayV5
FbxAMatrix * | mPivot
FbxError | mError
## Friends
class | FbxScene
## Error Management
enum | EErrorCode { eIndexOutOfRange, eNullParameter, eShapeAlreadyAdded, eShapeInvalidName, eShapeNameClash, eShapeNoCurveFound, eUnknownError, eErrorCount }
| Error identifiers. More...
FbxError & | GetError ()
| Retrieves the error object.
EErrorCode | GetLastErrorID () const
| Returns the last error code.
const char * | GetLastErrorString () const
| Returns the last error string.

## Member Enumeration Documentation

enum ESurfaceMode

Search for all occurrences

NURBS and Patches surface modes.

This information is never directly used inside the FBX SDK. Applications can use these values if they wish to carry the "rendering" details of the NURBS and Patches. The FBX SDK guarantee that the value (member of the FbxNurbs, FbxNurbsSurface and FbxPatch classes) is stored to FBX files and retrieved from them.

Remarks:
  The enum has been defined in this class to avoid symbols duplication.

Enumerator:

  eRaw | Search for all occurrences
  eLowNoNormals | Raw. Search for all occurrences
  eLow | Low and no normals. Search for all occurrences
  eHighNoNormals | Low. Search for all occurrences
  eHigh | High and no normals. High. Search for all occurrences

Definition at line 212 of file fbxgeometry.h.

        {
            eRaw,
            eLowNoNormals,
            eLow,
            eHighNoNormals,
            eHigh
        };

enum EErrorCode

Search for all occurrences

Error identifiers.

Enumerator:

  eIndexOutOfRange | The index used to access an item is out of range. Search for all occurrences
  eNullParameter | Requested pointer to shape object is `NULL`. Search for all occurrences
  eShapeAlreadyAdded | The specified shape has already been added to this object. Search for all occurrences
  eShapeInvalidName | The provided name argument is empty. Search for all occurrences
  eShapeNameClash | The provided name is already used by another shape. Search for all occurrences
  eShapeNoCurveFound | The shape's animation curve could not be found. Search for all occurrences
  eUnknownError | Generic error message. Search for all occurrences
  eErrorCount | Search for all occurrences

Reimplemented in FbxNurbs, FbxNurbsCurve, and FbxNurbsSurface.

Definition at line 305 of file fbxgeometry.h.

        {
            eIndexOutOfRange,
            eNullParameter,
            eShapeAlreadyAdded,
            eShapeInvalidName,
            eShapeNameClash,
            eShapeNoCurveFound,
            eUnknownError,
            eErrorCount
        };

## Constructor & Destructor Documentation

FbxGeometry | ( | FbxManager & | pManager,
|  | char const * | pName
| ) |  | `[protected]`

## Member Function Documentation

virtual FbxNodeAttribute::EType GetAttributeType | ( |  | ) | const `[virtual]`

Search for all occurrences

Returns the node attribute type.

This method is derived in the more high level classes (FbxMesh, FbxNurbs, etc...) and returns the actual type of the geometry object.

Returns:
  eUnknown

Reimplemented from FbxLayerContainer.

Reimplemented in FbxLine, FbxMesh, FbxNurbs, FbxNurbsCurve, FbxNurbsSurface, FbxPatch, FbxSubDiv, FbxBoundary, and FbxTrimNurbsSurface.

int AddDeformer | ( | FbxDeformer * | pDeformer | ) |

Search for all occurrences

Adds a deformer to this geometry (as mentioned in the description of this class, adding a deformer is a synonym for "connect a deformer").

Parameters:

  pDeformer | Pointer to the deformer to be added.

Returns:
  Index of the added deformer.

Examples:
  ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and SwitchBinding/main.cxx.

FbxDeformer* RemoveDeformer | ( | int | pIndex | ) |

Search for all occurrences

Remove a deformer.

Parameters:

  pIndex | Index of deformer to remove.

Returns:
  Pointer to the removed deformer (or `NULL` if pIndex is out of range). If pIndex is out of range FbxGeometry::GetLastErrorID() returns eIndexOutOfRange.

Examples:
  SwitchBinding/main.cxx.

int GetDeformerCount | ( |  | ) | const

Search for all occurrences

Returns the number of deformers.

Returns:
  The number of deformers that are connected to this geometry.

Examples:
  ImportScene/DisplayAnimation.cxx, ImportScene/DisplayLink.cxx, ImportScene/DisplayShape.cxx, ViewScene/DrawScene.cxx, and ViewScene/SceneContext.cxx.

FbxDeformer* GetDeformer | ( | int | pIndex | ) | const

Search for all occurrences

Returns the deformer at the specified index.

Parameters:

  pIndex | The specified deformer index.

Returns:
  Pointer to the deformer (or `NULL` if pIndex is out of range). If pIndex is out of range, FbxGeometry::GetLastErrorID() returns eIndexOutOfRange.

Examples:
  ExportScene03/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayLink.cxx, ImportScene/DisplayShape.cxx, SwitchBinding/main.cxx, ViewScene/DrawScene.cxx, and ViewScene/SceneContext.cxx.

int GetDeformerCount | ( | FbxDeformer::EDeformerType | pType | ) | const

Search for all occurrences

Returns the number of deformers of a specified type.

Parameters:

  pType | The specified deformer type.

Returns:
  The number of deformers of the specified type.

FbxDeformer* GetDeformer | ( | int | pIndex,
|  | FbxDeformer::EDeformerType | pType
| ) |  | const

Search for all occurrences

Returns the deformer of a specified type at the specified index.

Parameters:

  pIndex | The specified deformer index.
  pType | The specified deformer type.

Returns:
  Pointer to the deformer (or `NULL` if pIndex is out of range). If pIndex is out of range, FbxGeometry::GetLastErrorID() returns eIndexOutOfRange.

FbxGeometryWeightedMap* GetSourceGeometryWeightedMap | ( |  | ) |

Search for all occurrences

Returns the source geometry weighted map that is connected to this geometry.

Returns:
  Pointer to the source geometry weighted map that is connected to this geometry if any.

int GetDestinationGeometryWeightedMapCount | ( |  | ) | const

Search for all occurrences

Returns the number of destination geometry weighted map(s) that are connected to this geometry.

Returns:
  The number of destination geometry weighted map(s) that are connected to this geometry.

FbxGeometryWeightedMap* GetDestinationGeometryWeightedMap | ( | int | pIndex | ) |

Search for all occurrences

Returns the destination geometry weighted map at a specified index.

Parameters:

  pIndex | The specified index.

Returns:
  Pointer to the destination geometry weighted map at the specified index (if any).

bool AddShape | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex,
|  | FbxShape * | pShape,
|  | double | pPercent = `100`
| ) |  |

Search for all occurrences

Add a shape to the specified blend shape deformer and blend shape channel of this geometry.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.
  pShape | Pointer to the shape object to be added.
  pPercent | The full deform percentage of this shape.

Returns:
  `true` if success, `false` otherwise.

void ClearShape | ( |  | ) |

Search for all occurrences

Removes all the shapes without destroying them.

If shapes aren't explicitly destroyed before calling this function, they will be destroyed along with the SDK manager that created them.

int GetShapeCount | ( |  | ) | const

Search for all occurrences

Returns the number of shapes.

Returns:
  The number of shapes that have been added to this geometry.

Examples:
  ViewScene/DrawScene.cxx.

int GetShapeCount | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex
| ) |  | const

Search for all occurrences

Returns the number of shapes.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.

Returns:
  The number of shapes that have been added to this blend shape channel of this blend shape deformer.

FbxShape* GetShape | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex,
|  | int | pShapeIndex
| ) |  |

Search for all occurrences

Returns the shape found at the specified index on a blend shape channel of a blend shape deformer.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.
  pShapeIndex | The specified shape index.

Returns:
  Pointer to the shape (or `NULL` if pIndex is out of range). If pIndex is out of range, FbxGeometry::GetLastErrorID() returns eIndexOutOfRange.

FbxShape const* GetShape | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex,
|  | int | pShapeIndex
| ) |  | const

Search for all occurrences

Returns the shape found at the specified index on a blend shape channel of a blend shape deformer.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.
  pShapeIndex | The specified shape index.

Returns:
  Pointer to the shape (or `NULL` if pIndex is out of range). If pIndex is out of range, FbxGeometry::GetLastErrorID() returns eIndexOutOfRange.

FbxAnimCurve* GetShapeChannel | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex,
|  | FbxAnimLayer * | pLayer,
|  | bool | pCreateAsNeeded = `false`
| ) |  |

Search for all occurrences

Get the shape animation curve.

The shape channel is an animatable property with a value range from 0 to 100 (with 100 being full shape deformation). The default value is 0.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.
  pCreateAsNeeded | If `true`, creates the animation curve if it is not already present.
  pLayer | The animation layer from which we want to get the requested animation curve.

Returns:
  Animation curve (or NULL if an error occurred). If an error occurs, FbxGeometry::GetLastErrorID() returns one of the following:
  - eIndexOutOfRange: Shape index is out of range.
  - eShapeNoCurveFound: Shape curve could not be found.

Remarks:
  If pLayer is left at NULL, the method will use the first layer of the Animation stack.

Examples:
  ExportScene02/main.cxx, ExportScene03/main.cxx, ImportScene/DisplayAnimation.cxx, and ViewScene/DrawScene.cxx.

FbxAMatrix& GetPivot | ( | FbxAMatrix & | pXMatrix | ) | const

Search for all occurrences

Returns the pivot matrix.

Parameters:

  pXMatrix | Placeholder for the returned matrix.

Returns:
  Reference to the passed argument.

void SetPivot | ( | FbxAMatrix & | pXMatrix | ) |

Search for all occurrences

Sets the pivot matrix.

Parameters:

  pXMatrix | The transformation matrix that is assigned to the pivot matrix.

void ApplyPivot | ( |  | ) |

Search for all occurrences

Applies the pivot matrix to all vertices/normals of the geometry.

void SetDefaultShape | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex,
|  | double | pPercent
| ) |  |

Search for all occurrences

Sets the default deformation for a specified shape.

The default shape property has a value range from 0 to 100 (with 100 being full shape deformation). The default value is 0.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.
  pPercent | Deformation percentage (on a scale ranging from 0 to 100).

Remarks:
  This function has no effect if pIndex is out of range.

void SetDefaultShape | ( | FbxBlendShapeChannel * | pBlendShapeChannel,
|  | double | pPercent
| ) |  |

Search for all occurrences

Sets the default deformation for a specified shape.

The default shape property has a value range from 0 to 100 (with 100 being full shape deformation). The default value is 0.

Parameters:

  pBlendShape | The blend shape deformer.
  pBlendShapeChannel | The blend shape channel.
  pPercent | Deformation percentage (on a scale ranging from 0 to 100).

Remarks:
  This function has no effect if pShapeName is invalid.

double GetDefaultShape | ( | int | pBlendShapeIndex,
|  | int | pBlendShapeChannelIndex
| ) |  | const

Search for all occurrences

Returns the default deformation value for the specified shape.

The default shape property has a value range from 0 to 100 (with 100 being full shape deformation). The default value is 0.

Parameters:

  pBlendShapeIndex | The blend shape deformer index.
  pBlendShapeChannelIndex | The blend shape channel index.

Returns:
  The deformation value for the specified shape, or 0 if pIndex is out of range.

double GetDefaultShape | ( | FbxBlendShapeChannel * | pBlendShapeChannel | ) | const

Search for all occurrences

Returns the default deformation value for the specified shape.

The default shape property has a value range from 0 to 100 (with 100 being full shape deformation). The default value is 0.

Parameters:

  pBlendShape | The blend shape deformer.
  pBlendShapeChannel | The blend shape channel.

Returns:
  The deformation value for the specified shape, or 0 if pShapeName is invalid.

FbxError& GetError | ( |  | ) |

Search for all occurrences

Retrieves the error object.

Returns:
  Reference to the error object.

EErrorCode GetLastErrorID | ( |  | ) | const

Search for all occurrences

Returns the last error code.

Returns:
  The last error code.

const char* GetLastErrorString | ( |  | ) | const

Search for all occurrences

Returns the last error string.

Returns:
  Text description of the last error.

virtual FbxObject& Copy | ( | const FbxObject & | pObject | ) | `[virtual]`

Search for all occurrences

Copy an object content into this object.

Parameters:

  pObject | The source object to copy data from.

Returns:
  Returns the destination object being modified by the source.

Remarks:
  This function replace the assignment operator (operator=). It will copy all property values and the name. Connections are NOT copied.

Reimplemented from FbxGeometryBase.

Reimplemented in FbxLine, FbxMesh, FbxNurbs, FbxNurbsCurve, FbxNurbsSurface, FbxPatch, FbxBoundary, and FbxTrimNurbsSurface.

virtual void Destruct | ( | bool | pRecursive,
|  | bool | pDependents
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from FbxLayerContainer.

Reimplemented in FbxLine, FbxMesh, FbxNurbs, FbxNurbsCurve, FbxNurbsSurface, FbxPatch, and FbxSubDiv.

virtual void SetDocument | ( | FbxDocument * | pDocument | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from FbxLayerContainer.

void CleanShapeChannels | ( | FbxAnimLayer * | pAnimLayer | ) |

Search for all occurrences

Rename the shapes from the old MotionBuilder 4.01 format to the new one.

void CleanShapeChannel | ( | FbxAnimLayer * | pAnimLayer,
|  | int | pShapeIndex
| ) |  |

Search for all occurrences

Rename the shapes from the old MotionBuilder 4.01 format to the new one.

void CreateShapeChannelProperties | ( | FbxString & | pShapeName | ) |

Search for all occurrences

FbxString CreateShapeChannelName | ( | int | pShapeIndex | ) | `[protected]`

Search for all occurrences

FbxString CreateShapeChannelName | ( | FbxString | pShapeName | ) | `[protected]`

Search for all occurrences

void ConvertShapeNamesToV5Format | ( | FbxString | pTakeNodeName | ) |

Search for all occurrences

void ConvertShapeNamesToV5Format | ( | FbxString | pTakeNodeName,
|  | int | pShapeIndex
| ) |  |

Search for all occurrences

void RevertShapeNamesToV6Format | ( | FbxString | pTakeNodeName | ) |

Search for all occurrences

void RevertShapeNamesToV6Format | ( | FbxString | pTakeNodeName,
|  | int | pShapeIndex
| ) |  |

Search for all occurrences

void ClearTemporaryShapeNames | ( |  | ) |

Search for all occurrences

void CopyDeformers | ( | FbxGeometry const * | pGeometry | ) | `[protected]`

Search for all occurrences

void CopyPivot | ( | FbxGeometry const * | pSource | ) | `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class FbxScene `[friend]`

Search for all occurrences

Reimplemented from FbxLayerContainer.

Definition at line 383 of file fbxgeometry.h.

## Member Data Documentation

FbxArray<FbxString*> mShapeNameArrayV6 `[protected]`

Search for all occurrences

Definition at line 374 of file fbxgeometry.h.

FbxArray<FbxString*> mShapeNameArrayV5 `[protected]`

Search for all occurrences

Definition at line 375 of file fbxgeometry.h.

FbxArray<FbxString*> mShapeChannelNameArrayV5 `[protected]`

Search for all occurrences

Definition at line 376 of file fbxgeometry.h.

FbxAMatrix* mPivot `[protected]`

Search for all occurrences

Definition at line 378 of file fbxgeometry.h.

FbxError mError `[mutable, protected]`

Search for all occurrences

Definition at line 381 of file fbxgeometry.h.

The documentation for this class was generated from the following file:

- fbxsdk/scene/geometry/fbxgeometry.h

FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry
FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry FbxGeometry