#include
<kfbxgeometry.h>
KFbxMesh, KFbxNurb, and KFbxPatch). The KFbxGeometry provides support for the following kinds of deformations.
geometry.GetSrcObjectCount(KFbxDeformer::ClassId)
The shapes data manipulation is some what more complex than the other deformations and it is strongly advised to use the interfaces in this class rather than trying to directly manipulate the connections.
Definition at line 83 of file kfbxgeometry.h.
Error Management |
|
enum | EError { eINDEX_OUT_OF_RANGE, eNULL_PARAMETER, eSHAPE_ALREADY_ADDED, eSHAPE_INVALID_NAME, eSHAPE_NAME_CLASH, eSHAPE_NO_CURVE_FOUND, eUNKNOWN_ERROR, eERROR_COUNT } |
Error identifiers. More... |
|
KError & | GetError () |
Retrieves the error object. |
|
EError | GetLastErrorID () const |
Returns the last error code. |
|
const char * | GetLastErrorString () const |
Returns the last error string. |
|
Public Types |
|
enum | ESurfaceMode
{ eRAW, eLOW_NO_NORMALS, eLOW, eHIGH_NO_NORMALS, eHIGH } |
NURBS and Patches surface modes. More... |
|
Public Member Functions |
|
virtual EAttributeType | GetAttributeType () const |
Returns the node attribute type. |
|
virtual KFbxObject * | Clone (KFbxObject *pContainer, KFbxObject::ECloneType pCloneType) const |
Creates a clone of this object. |
|
Deformer Management
|
|
int | AddDeformer (KFbxDeformer *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"). |
|
KFbxDeformer * | RemoveDeformer (int pIndex) |
Remove a deformer. |
|
int | GetDeformerCount () const |
Returns the number of deformers. |
|
KFbxDeformer * | GetDeformer (int pIndex) const |
Returns the deformer at the specified index.
|
|
int | GetDeformerCount (KFbxDeformer::EDeformerType pType) const |
Returns the number of deformers of a
specified type. |
|
KFbxDeformer * | GetDeformer (int pIndex, KFbxDeformer::EDeformerType pType) const |
Returns the deformer of a specified type at
the specified index. |
|
Geometry Weighted Map(s) Management
|
|
KFbxGeometryWeightedMap * | 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. |
|
KFbxGeometryWeightedMap * | GetDestinationGeometryWeightedMap (int pIndex) |
Returns the destination geometry weighted
map at a specified index. |
|
Shape(s) Management
|
|
virtual int | AddShape (KFbxShape *pShape, char const *pShapeName) |
Add a shape and the shape's associated name
to this geometry. |
|
virtual void | ClearShape () |
Removes all the shapes without destroying
them. |
|
virtual int | GetShapeCount () const |
Returns the number of shapes. |
|
virtual KFbxShape * | GetShape (int pIndex) |
Returns the shape found at the specified
index. |
|
virtual KFbxShape const * | GetShape (int pIndex) const |
Returns the shape found at the specified
index. |
|
virtual char const * | GetShapeName (int pIndex) const |
Returns the shape name found at the
specified index. |
|
virtual K_DEPRECATED KFCurve * | GetShapeChannel (char const *pShapeName, bool pCreateAsNeeded=false, char const *pTakeName=NULL) |
Get the shape animation curve. |
|
virtual KFbxAnimCurve * | GetShapeChannel (char const *pShapeName, KFbxAnimLayer *pLayer, bool pCreateAsNeeded=false) |
Get the shape animation curve. |
|
virtual KFCurve * | GetShapeChannel (int pIndex, bool pCreateAsNeeded=false, char const *pTakeName=NULL) |
Get the shape animation curve. |
|
virtual KFbxAnimCurve * | GetShapeChannel (int pIndex, KFbxAnimLayer *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.
|
|
KFbxXMatrix & | GetPivot (KFbxXMatrix &pXMatrix) const |
Returns the pivot matrix. |
|
void | SetPivot (KFbxXMatrix &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 pIndex, double pPercent) |
Sets the default deformation for a specified
shape. |
|
void | SetDefaultShape (char const *pShapeName, double pPercent) |
Sets the default deformation for a specified
shape. |
|
double | GetDefaultShape (int pIndex) const |
Returns the default deformation value for
the specified shape. |
|
double | GetDefaultShape (char const *pShapeName) const |
Returns the default deformation value for
the specified shape. |
enum ESurfaceMode |
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 KFbxNurb, KFbxNurbSurface and KFbxPatch classes) is stored to FBX files and retrieved from them.
Definition at line 270 of file kfbxgeometry.h.
enum EError |
Error identifiers.
Definition at line 359 of file kfbxgeometry.h.
virtual EAttributeType GetAttributeType | ( | ) | const [virtual] |
Returns the node attribute type.
This method is derived in the more high level classes (KFbxMesh, KFbxNurbs, etc...) and returns the actual type of the geometry object.
Reimplemented from KFbxLayerContainer.
Reimplemented in KFbxMesh, KFbxNurb, KFbxNurbsCurve, KFbxNurbsSurface, KFbxPatch, KFbxSubdiv, KFbxBoundary, and KFbxTrimNurbsSurface.
int AddDeformer | ( | KFbxDeformer * | 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").
pDeformer | Pointer to the deformer to be added. |
KFbxDeformer* RemoveDeformer | ( | int | pIndex | ) |
Remove a deformer.
pIndex | Index of deformer to remove. |
NULL
if pIndex
is out of range). If pIndex is out of range KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.int GetDeformerCount | ( | ) | const |
Returns the number of deformers.
KFbxDeformer* GetDeformer | ( | int | pIndex | ) | const |
Returns the deformer at the specified index.
pIndex | The specified deformer index. |
NULL
if pIndex is out
of range). If pIndex is out of range, KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.int GetDeformerCount | ( | KFbxDeformer::EDeformerType | pType | ) | const |
Returns the number of deformers of a specified type.
pType | The specified deformer type. |
KFbxDeformer* GetDeformer | ( | int | pIndex, | |
KFbxDeformer::EDeformerType | pType | |||
) | const |
Returns the deformer of a specified type at the specified index.
pIndex | The specified deformer index. | |
pType | The specified deformer type. |
NULL
if pIndex is out
of range). If pIndex is out of range, KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.KFbxGeometryWeightedMap* 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.
KFbxGeometryWeightedMap* GetDestinationGeometryWeightedMap | ( | int | pIndex | ) |
Returns the destination geometry weighted map at a specified index.
pIndex | The specified index. |
Add a shape and the shape's associated name to this geometry.
pShape | Pointer to the shape object to be added. | |
pShapeName | Name of the shape. |
NULL
.Reimplemented in KFbxTrimNurbsSurface.
virtual void ClearShape | ( | ) | [virtual] |
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.
Reimplemented in KFbxTrimNurbsSurface.
virtual int GetShapeCount | ( | ) | const [virtual] |
Returns the number of shapes.
Reimplemented in KFbxTrimNurbsSurface.
Returns the shape found at the specified index.
pIndex | The specified index. |
NULL
if pIndex is out of
range). If pIndex is out of range, KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.Reimplemented in KFbxTrimNurbsSurface.
Returns the shape found at the specified index.
pIndex | The specified index. |
NULL
if pIndex is out of
range). If pIndex is out of range, KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.Reimplemented in KFbxTrimNurbsSurface.
virtual char const* GetShapeName | ( | int | pIndex | ) | const [virtual] |
Returns the shape name found at the specified index.
pIndex | The specified index. |
NULL
if pIndex is out of range). If
pIndex is out of range, KFbxGeometry::GetLastErrorID()
returns eINDEX_OUT_OF_RANGE.Reimplemented in KFbxTrimNurbsSurface.
virtual K_DEPRECATED KFCurve* GetShapeChannel | ( | char const * | pShapeName, | |
bool | pCreateAsNeeded =
false , |
|||
char const * | pTakeName = NULL |
|||
) | [virtual] |
Get the shape animation curve.
This method is deprecated and should not be used anymore. Instead call the equivalent using the KFbxAnimLayer.
pShapeName | ||
pCreateAsNeeded | ||
pTakeName |
virtual KFbxAnimCurve* GetShapeChannel | ( | char const * | pShapeName, | |
KFbxAnimLayer * | pLayer, | |||
bool | pCreateAsNeeded =
false |
|||
) | [virtual] |
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.
pShapeName | The shape name. | |
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. |
virtual KFCurve* GetShapeChannel | ( | int | pIndex, | |
bool | pCreateAsNeeded =
false , |
|||
char const * | pTakeName = NULL |
|||
) | [virtual] |
Get the shape animation curve.
This method is deprecated and should not be used anymore. Instead call the equivalent using the KFbxAnimLayer.
pIndex | ||
pCreateAsNeeded | ||
pTakeName |
Reimplemented in KFbxTrimNurbsSurface.
virtual KFbxAnimCurve* GetShapeChannel | ( | int | pIndex, | |
KFbxAnimLayer * | pLayer, | |||
bool | pCreateAsNeeded =
false |
|||
) | [virtual] |
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.
pIndex | The shape index. | |
pCreateAsNeeded | If true , creates the animation curve if it is not
already present. |
|
pLayer | Animation layer from which we want to get the requested animation curve. |
Reimplemented in KFbxTrimNurbsSurface.
KFbxXMatrix& GetPivot | ( | KFbxXMatrix & | pXMatrix | ) | const |
Returns the pivot matrix.
pXMatrix | Placeholder for the returned matrix. |
void SetPivot | ( | KFbxXMatrix & | pXMatrix | ) |
Sets the pivot matrix.
pXMatrix | The transformation matrix that is assigned to the pivot matrix. |
void ApplyPivot | ( | ) |
Applies the pivot matrix to all vertices/normals of the geometry.
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.
pIndex | The shape index. | |
pPercent | Deformation percentage (on a scale ranging from 0 to 100). |
void SetDefaultShape | ( | char const * | pShapeName, | |
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.
pShapeName | The shape name. | |
pPercent | Deformation percentage (on a scale ranging from 0 to 100). |
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.
pIndex | The shape index. |
double GetDefaultShape | ( | char const * | pShapeName | ) | 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.
pShapeName | The shape name. |
KError& GetError | ( | ) |
Retrieves the error object.
EError GetLastErrorID | ( | ) | const |
Returns the last error code.
const char* GetLastErrorString | ( | ) | const |
Returns the last error string.
virtual KFbxObject* Clone | ( | KFbxObject * | pContainer, | |
KFbxObject::ECloneType | pCloneType | |||
) | const [virtual] |
Creates a clone of this object.
pContainer | The object, typically a document or a scene, that contains the new clone(can be NULL). | |
pCloneType | The type of clone to be created. |
Reimplemented from KFbxNodeAttribute.
Reimplemented in KFbxMesh, and KFbxProceduralGeometry.