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

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.

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)

Definition at line 45 of file fbxgeometry.h.

#include <fbxgeometry.h>

Inheritance diagram for FbxGeometry:
Inheritance graph
[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 FbxObjectCopy (const FbxObject &pObject)
 Copy an object content into this object.
void CleanShapeChannels (FbxAnimLayer *pAnimLayer)
void CleanShapeChannel (FbxAnimLayer *pAnimLayer, int pShapeIndex)
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").
FbxDeformerRemoveDeformer (int pIndex, FbxStatus *pStatus=NULL)
 Remove a deformer.
int GetDeformerCount () const
 Returns the number of deformers.
FbxDeformerGetDeformer (int pIndex, FbxStatus *pStatus=NULL) const
 Returns the deformer at the specified index.
int GetDeformerCount (FbxDeformer::EDeformerType pType) const
 Returns the number of deformers of a specified type.
FbxDeformerGetDeformer (int pIndex, FbxDeformer::EDeformerType pType, FbxStatus *pStatus=NULL) const
 Returns the deformer of a specified type at the specified index.
Geometry Weighted Maps Management
FbxGeometryWeightedMapGetSourceGeometryWeightedMap ()
 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.
FbxGeometryWeightedMapGetDestinationGeometryWeightedMap (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, FbxStatus *pStatus=NULL)
 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, FbxStatus *pStatus=NULL) const
 Returns the number of shapes.
FbxShapeGetShape (int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus *pStatus=NULL)
 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, FbxStatus *pStatus=NULL) const
 Returns the shape found at the specified index on a blend shape channel of a blend shape deformer.
FbxAnimCurveGetShapeChannel (int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxAnimLayer *pLayer, bool pCreateAsNeeded=false, FbxStatus *pStatus=NULL)
 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.

FbxAMatrixGetPivot (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

virtual void Construct (const FbxGeometry *pFrom)
virtual void Destruct (bool pRecursive)
 Optional destructor override, automatically called by default destructor.
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
FbxAMatrixmPivot

Member Enumeration Documentation

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 
eLowNoNormals 

Raw.

eLow 

Low and no normals.

eHighNoNormals 

Low.

eHigh 

High and no normals.

High.

Definition at line 200 of file fbxgeometry.h.


Member Function Documentation

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

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)

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:
pDeformerPointer to the deformer to be added.
Returns:
Index of the added deformer.
FbxDeformer* RemoveDeformer ( int  pIndex,
FbxStatus pStatus = NULL 
)

Remove a deformer.

Parameters:
pIndexIndex of deformer to remove.
pStatusThe FbxStatus object to hold error codes.
Returns:
Pointer to the removed deformer (or NULL if pIndex is out of range).
int GetDeformerCount ( ) const

Returns the number of deformers.

Returns:
The number of deformers that are connected to this geometry.
FbxDeformer* GetDeformer ( int  pIndex,
FbxStatus pStatus = NULL 
) const

Returns the deformer at the specified index.

Parameters:
pIndexThe specified deformer index.
pStatusThe FbxStatus object to hold error codes.
Returns:
Pointer to the deformer (or NULL if pIndex is out of range).
int GetDeformerCount ( FbxDeformer::EDeformerType  pType) const

Returns the number of deformers of a specified type.

Parameters:
pTypeThe specified deformer type.
Returns:
The number of deformers of the specified type.
FbxDeformer* GetDeformer ( int  pIndex,
FbxDeformer::EDeformerType  pType,
FbxStatus pStatus = NULL 
) const

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

Parameters:
pIndexThe specified deformer index.
pTypeThe specified deformer type.
pStatusThe FbxStatus object to hold error codes.
Returns:
Pointer to the deformer (or NULL if pIndex is out of range).
FbxGeometryWeightedMap* GetSourceGeometryWeightedMap ( )

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

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)

Returns the destination geometry weighted map at a specified index.

Parameters:
pIndexThe 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,
FbxStatus pStatus = NULL 
)

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

Parameters:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pShapePointer to the shape object to be added.
pPercentThe full deform percentage of this shape.
pStatusThe FbxStatus object to hold error codes.
Returns:
true if success, false otherwise.
void ClearShape ( )

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

Returns the number of shapes.

Returns:
The number of shapes that have been added to this geometry.
int GetShapeCount ( int  pBlendShapeIndex,
int  pBlendShapeChannelIndex,
FbxStatus pStatus = NULL 
) const

Returns the number of shapes.

Parameters:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pStatusThe FbxStatus object to hold error codes.
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,
FbxStatus pStatus = NULL 
)

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

Parameters:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pShapeIndexThe specified shape index.
pStatusThe FbxStatus object to hold error codes.
Returns:
Pointer to the shape (or NULL if pIndex is out of range).
FbxShape const* GetShape ( int  pBlendShapeIndex,
int  pBlendShapeChannelIndex,
int  pShapeIndex,
FbxStatus pStatus = NULL 
) const

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

Parameters:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pShapeIndexThe specified shape index.
pStatusThe FbxStatus object to hold error codes.
Returns:
Pointer to the shape (or NULL if pIndex is out of range).
FbxAnimCurve* GetShapeChannel ( int  pBlendShapeIndex,
int  pBlendShapeChannelIndex,
FbxAnimLayer pLayer,
bool  pCreateAsNeeded = false,
FbxStatus pStatus = NULL 
)

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:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pLayerThe animation layer from which we want to get the requested animation curve.
pCreateAsNeededIf true, creates the animation curve if it is not already present.
pStatusThe FbxStatus object to hold error codes.
Returns:
Animation curve (or NULL if an error occurred).
Remarks:
If pLayer is left at NULL, the method will use the first layer of the Animation stack.
FbxAMatrix& GetPivot ( FbxAMatrix pXMatrix) const

Returns the pivot matrix.

Parameters:
pXMatrixPlaceholder for the returned matrix.
Returns:
Reference to the passed argument.
void SetPivot ( FbxAMatrix pXMatrix)

Sets the pivot matrix.

Parameters:
pXMatrixThe transformation matrix that is assigned to the pivot matrix.
void ApplyPivot ( )

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

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

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:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe blend shape channel index.
pPercentDeformation 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 
)

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:
pBlendShapeThe blend shape deformer.
pBlendShapeChannelThe blend shape channel.
pPercentDeformation 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

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:
pBlendShapeIndexThe blend shape deformer index.
pBlendShapeChannelIndexThe 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

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:
pBlendShapeThe blend shape deformer.
pBlendShapeChannelThe blend shape channel.
Returns:
The deformation value for the specified shape, or 0 if pShapeName is invalid.
virtual FbxObject& Copy ( const FbxObject pObject) [virtual]

Copy an object content into this object.

Parameters:
pObjectThe 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.

void CleanShapeChannels ( FbxAnimLayer pAnimLayer)
void CleanShapeChannel ( FbxAnimLayer pAnimLayer,
int  pShapeIndex 
)
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 ( )
virtual void Construct ( const FbxGeometry pFrom) [protected, virtual]
virtual void Destruct ( bool  pRecursive) [protected, virtual]

Optional destructor override, automatically called by default destructor.

Parameters:
pRecursiveIf true, children objects should be destroyed as well.
Remarks:
In case it is decided to override this function, do not forget to call ParentClass::Destruct(pResursive) at the end.

Reimplemented from FbxLayerContainer.

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

virtual void SetDocument ( FbxDocument pDocument) [protected, virtual]
FbxString CreateShapeChannelName ( int  pShapeIndex) [protected]
FbxString CreateShapeChannelName ( FbxString  pShapeName) [protected]
void CopyDeformers ( FbxGeometry const *  pGeometry) [protected]
void CopyPivot ( FbxGeometry const *  pSource) [protected]

Member Data Documentation

Definition at line 308 of file fbxgeometry.h.

Definition at line 309 of file fbxgeometry.h.

Definition at line 310 of file fbxgeometry.h.

FbxAMatrix* mPivot [protected]

Definition at line 312 of file fbxgeometry.h.


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

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