#include <kfbxconstraint.h>
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.
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. |
|
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. |
|
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. |
|
K_DEPRECATED void | SetActive (bool pActive) |
This method is deprecated and should be
replaced with Active.Set(active_value). |
|
K_DEPRECATED bool | GetActive () const |
This method is deprecated and should be
replaced with active_value = Active.Get(). |
enum EConstraintType |
Constraint attribute types.
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.
Reimplemented in KFbxCharacter.
Definition at line 171 of file kfbxconstraint.h.
virtual EConstraintType GetConstraintType | ( | ) | const [inline, virtual] |
Access the type of the constraint.
Definition at line 120 of file kfbxconstraint.h.
References eUNIDENTIFIED.
virtual KFbxObject* GetConstrainedObject | ( | ) | const [inline, virtual] |
Retrieve the constrained object.
Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.
Definition at line 125 of file kfbxconstraint.h.
References NULL.
virtual int GetConstraintSourceCount | ( | ) | const [inline, virtual] |
Retrieve the count of constraint source.
Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.
Definition at line 130 of file kfbxconstraint.h.
virtual KFbxObject* GetConstraintSource | ( | int | pIndex | ) | const [inline, virtual] |
Retrieve a constraint source with the specified index.
pIndex | The specified index. |
Reimplemented in KFbxConstraintAim, KFbxConstraintParent, KFbxConstraintPosition, KFbxConstraintRotation, and KFbxConstraintScale.
Definition at line 136 of file kfbxconstraint.h.
References NULL.
virtual void SetOffset | ( | KFbxVector4 | pOffset | ) | [virtual] |
Set value of the offset.
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.
pObject | The given constraint source. |
K_DEPRECATED void SetActive | ( | bool | pActive | ) |
This method is deprecated and should be replaced with Active.Set(active_value).
K_DEPRECATED bool GetActive | ( | ) | const |
This method is deprecated and should be replaced with active_value = Active.Get().
KError& GetError | ( | ) |
Retrieve error object.
EError GetLastErrorID | ( | ) | const |
Get last error code.
const char* GetLastErrorString | ( | ) | const |
Get last error string.
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.