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

KFbxConstraint Class Reference

This reference page is linked to from the following overview topics: Supported Scene Elements, FBX Nodes, Transformation Data, List of Python FBX classes.


Search for all occurrences

Detailed Description

Base class for weighted animation constraints.

Constraints are primarily used to impose limits on properties of objects (e.g. position, orientation, scale) and to automate animation processes. A constrained object is an object with properties constrained by one or more weighted constraint sources.

Definition at line 60 of file kfbxconstraint.h.

#include <kfbxconstraint.h>

Inheritance diagram for KFbxConstraint:
Inheritance graph
[legend]

List of all members.

Public Types

enum   EConstraintType {
  eUNIDENTIFIED, ePOSITION, eROTATION, eSCALE,
  ePARENT, eSINGLECHAIN_IK, eAIM, eCHARACTER_CONSTRAINT,
  eCUSTOM, eCONSTRAINT_COUNT
}
 

Constraint attribute types.

More...

Public Member Functions

virtual EConstraintType  GetConstraintType () const
  Access the type of the constraint.
virtual KFbxObject GetConstrainedObject () const
  Retrieve the constrained object.
virtual int  GetConstraintSourceCount () const
  Retrieve the count of constraint source.
virtual KFbxObject GetConstraintSource (int pIndex) const
  Retrieve a constraint source with the specified index.
virtual void  SetOffset (KFbxVector4 pOffset)
  Set value of the offset.
double  GetSourceWeight (const KFbxObject *pObject) const
  Get the weight associated with a constraint source.

Protected Member Functions

  KFbxConstraint (KFbxSdkManager &pManager, char const *pName)
virtual bool  ConstructProperties (bool pForceSet)

Friends

class  KFbxScene

Properties

KFbxTypedProperty< fbxDouble1 Weight
  This property represents the degree of influence of a constraint from 0.0 (no influence) to 100.0 (full influence).
KFbxTypedProperty< fbxBool1 Active
  This property controls whether the constraint is applied or not.
KFbxTypedProperty< fbxBool1 Lock
  This property handles the lock state of the constraint.

Error Management

enum   EError { eERROR, eERROR_COUNT }
 

Error identifiers.

More...
KError GetError ()
  Retrieve error object.
EError  GetLastErrorID () const
  Get last error code.
const char *  GetLastErrorString () const
  Get last error string.

Member Enumeration Documentation

Constraint attribute types.

  • eUNIDENTIFIED Invalid constraint.
  • ePOSITION Position constraint (referred to as a point constraint in Maya).
  • eROTATION Rotation constraint (referred to as an orient constraint in Maya).
  • eSCALE Scale constraint.
  • ePARENT Parent constraint.
  • eSINGLECHAIN_IK Single chain IK constraint.
  • eAIM Aim constraint.
  • eCHARACTER_CONSTRAINT Character.
  • eCUSTOM Constraint defined by customers.
  • eCONSTRAINT_COUNT The count of constraint type.
Enumerator:
eUNIDENTIFIED 
ePOSITION 
eROTATION 
eSCALE 
ePARENT 
eSINGLECHAIN_IK 
eAIM 
eCHARACTER_CONSTRAINT 
eCUSTOM 
eCONSTRAINT_COUNT 

Definition at line 103 of file kfbxconstraint.h.

enum EError

Error identifiers.

  • eERROR
  • eERROR_COUNT
Enumerator:
eERROR 
eERROR_COUNT 

Reimplemented in KFbxCharacter.

Definition at line 163 of file kfbxconstraint.h.


Constructor & Destructor Documentation

KFbxConstraint ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

virtual EConstraintType GetConstraintType ( ) const [inline, virtual]
virtual KFbxObject* GetConstrainedObject ( ) const [inline, virtual]

Retrieve the constrained object.

Returns:
The constrained object.

Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.

Definition at line 125 of file kfbxconstraint.h.

{ return NULL; }
virtual int GetConstraintSourceCount ( ) const [inline, virtual]

Retrieve the count of constraint source.

Returns:
The count of constraint source.

Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.

Definition at line 130 of file kfbxconstraint.h.

{ return 0; }
virtual KFbxObject* GetConstraintSource ( int  pIndex ) const [inline, virtual]

Retrieve a constraint source with the specified index.

Parameters:
pIndex The specified index.
Returns:
The constraint source at the specified index.

Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.

Definition at line 136 of file kfbxconstraint.h.

{ return NULL; }
virtual void SetOffset ( KFbxVector4  pOffset ) [virtual]

Set value of the offset.

Parameters:
pOffset Offset vector value.

Reimplemented in KFbxConstraintAim, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.

double GetSourceWeight ( const KFbxObject pObject ) const

Get the weight associated with a constraint source.

Parameters:
pObject The given constraint source.
Returns:
The weight of the constraint source.
KError& GetError ( )

Retrieve error object.

Returns:
Reference to error object.
EError GetLastErrorID ( ) const

Get last error code.

Returns:
Last error code.
const char* GetLastErrorString ( ) const

Get last error string.

Returns:
Textual description of the last error.
virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]

Friends And Related Function Documentation

friend class KFbxScene [friend]

Reimplemented from KFbxObject.

Reimplemented in KFbxCharacter.

Definition at line 201 of file kfbxconstraint.h.


Member Data Documentation

This property represents the degree of influence of a constraint from 0.0 (no influence) to 100.0 (full influence).

Default value is 100.0.

Definition at line 73 of file kfbxconstraint.h.

This property controls whether the constraint is applied or not.

If the value is false the constraint will have no effect. The default value is true.

Default value is true.

Definition at line 80 of file kfbxconstraint.h.

This property handles the lock state of the constraint.

When enabled, the constrained object cannot be moved away from its constrained location when the constraint is active.

Default value is false.

Definition at line 88 of file kfbxconstraint.h.


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

KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint
KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint KFbxConstraint