Public Member Functions | Public Attributes

FBConstraint Class Reference

This reference page is linked to from the following overview topics: Your First Python Program, Constraints.


Search for all occurrences

Detailed Description

Base class for constraints.

Definition at line 134 of file fbconstraint.h.

#include <fbconstraint.h>

Inheritance diagram for FBConstraint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBConstraint (const char *pName, HIObject pObject=NULL)
 Constructor.
 IObject_Declare (K_IMPLEMENTATION)
virtual void ActiveChanged ()
 Notification for Activation Status Change.
virtual void RemoveAllAnimationNodes ()
 Remove animation nodes.
virtual void SetupAllAnimationNodes ()
 Setup animation nodes.
virtual void SnapSuggested ()
 Suggest 'snap'.
virtual void FreezeSuggested ()
 Suggest 'freeze'.
virtual bool Disable (FBModel *pModel)
 Disable constraint on pModel.
virtual bool Enable (FBModel *pModel)
 Enable constraint on pModel.
virtual bool AnimationNodeNotify (FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo, FBConstraintInfo *pConstraintInfo)
 Notification callback for connectors.
virtual void SaveModelState (FBModel *pModel, bool pS, bool pR, bool pT)
 Save current state of pModel.
virtual void RestoreModelState (FBModel *pModel)
 Restore the saved model state onto pModel.
virtual void FreezeSRT (FBModel *pModel, bool pS, bool pR, bool pT)
 Freeze current model state.
virtual FBConstraintClone ()
 Clone the constraint.
int ReferenceGroupGetCount ()
 Return the number of reference groups.
int ReferenceGroupAdd (const char *pGroupName, int pMaxItemCount)
 Add a group of references.
const char * ReferenceGroupGetName (int pGroupIndex)
 Get the name of the reference group.
int ReferenceGroupGetMaxCount (int pGroupIndex)
 Get the maximum number of items that can exist in the reference group in question.
FBModelReferenceGet (int pGroupIndex, int pItemIndex=0)
 Get a reference.
int ReferenceGetCount (int pGroupIndex)
 Get number of references in a specified group.
bool ReferenceAdd (int pGroupIndex, FBModel *pModel)
 Add a reference to a specified group.
bool ReferenceRemove (int pGroupIndex, FBModel *pModel)
 Remove a reference to pModel from the group at pGroupIndex.
void ReferenceRemoveAll ()
 Remove All References.
virtual bool DeformerPreNotify (FBModel *pModel, FBEvaluateInfo *pEvaluateInfo, FBVertex *pBBoxMin, FBVertex *pBBoxMax)
 Deformation pre-notification function This function pass the evaluation information for deformation (if timing is required).
virtual bool DeformerNotify (FBModel *pModel, const FBVertex *pSrcVertex, const FBVertex *pSrcNormal, int pCount, FBVertex *pDstVertex, FBVertex *pDstNormal)
 Deformation notification function.
FBAnimationNodeAnimationNodeOutCreate (kReference pUserId, FBModel *pModel, const char *pAttribute)
 Animation Node Creations (IN/OUT).
FBAnimationNodeAnimationNodeInCreate (kReference pUserId, FBModel *pModel, const char *pAttribute)
FBAnimationNodeAnimationNodeInCreate (kReference pUserId, FBProperty *pProperty)
 Animation Node Creations (IN).
virtual bool ReferenceAddNotify (int pGroupIndex, FBModel *pModel)
 Notification callbacks for when a reference is added or removed.
virtual bool ReferenceRemoveNotify (int pGroupIndex, FBModel *pModel)
virtual bool DeformerBind (FBModel *pModel)
 Bind/Unbind pModel to deformation constraint.
virtual bool DeformerUnBind (FBModel *pModel)
virtual bool FbxStore (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
 Store/Retrieve data to/from FBX files.
virtual bool FbxRetrieve (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)

Public Attributes

FBPropertyBool Deformer
 Read Write Property: Is a deformer constraint?
FBPropertyBool HasLayout
 Read Write Property: Does the constraint have a layout?
FBPropertyString Description
 Read Write Property: Long description of constraint.
FBPropertyBool Active
 Read Write Property: Active state.
FBPropertyBool Lock
 Read Write Property: Lock state.
FBPropertyAction Snap
 Function Property: Snap constraint.
FBPropertyAnimatableDouble Weight
 Read Write Property: Weight of constraint.

Constructor & Destructor Documentation

FBConstraint ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of constraint.
pObjectFor internal use only (default is NULL).

Member Function Documentation

IObject_Declare ( K_IMPLEMENTATION  )
virtual void ActiveChanged ( ) [virtual]

Notification for Activation Status Change.

virtual void RemoveAllAnimationNodes ( ) [virtual]

Remove animation nodes.

virtual void SetupAllAnimationNodes ( ) [virtual]

Setup animation nodes.

virtual void SnapSuggested ( ) [virtual]
virtual void FreezeSuggested ( ) [virtual]

Suggest 'freeze'.

virtual bool Disable ( FBModel pModel) [virtual]

Disable constraint on pModel.

Parameters:
pModelModel on which constraint should be disabled.
Returns:
true if successful.
virtual bool Enable ( FBModel pModel) [virtual]

Enable constraint on pModel.

Parameters:
pModelModel on which constraint should be enable.
Returns:
true if successful.
virtual bool AnimationNodeNotify ( FBAnimationNode pAnimationNode,
FBEvaluateInfo pEvaluateInfo,
FBConstraintInfo pConstraintInfo 
) [virtual]

Notification callback for connectors.

Parameters:
pAnimationNodeAnimation node being notified.
pEvaluateInfoInformation for evaluation.
pConstraintInfoInformation for constraint.
Returns:
true if successful.
FBAnimationNode* AnimationNodeOutCreate ( kReference  pUserId,
FBModel pModel,
const char *  pAttribute 
)

Animation Node Creations (IN/OUT).

Used to create the connectors (in or out) on an animation node. This function will return a newly created animation node, connected to the model specified by pModel.

Parameters:
pUserIdUser specified reference number.
pModelModel to associate with animation node.
pAttributeAttribute of model to animate (i.e. Translation, Lcl Translation, etc.)
Returns:
Newly created IN/OUT animation node.
FBAnimationNode* AnimationNodeInCreate ( kReference  pUserId,
FBModel pModel,
const char *  pAttribute 
)
FBAnimationNode* AnimationNodeInCreate ( kReference  pUserId,
FBProperty pProperty 
)

Animation Node Creations (IN).

Used to create the In connectors on an animation node. This function will return a newly created animation node, connected to the model specified by pProperty.

Parameters:
pUserIdUser specified reference number.
pPropertyProperty of model to animate (must be animatable)
Returns:
Newly created IN animation node.
virtual void SaveModelState ( FBModel pModel,
bool  pS,
bool  pR,
bool  pT 
) [virtual]

Save current state of pModel.

Parameters:
pModelModel to save.
pSScaling information?
pRRotation information?
pTTranslation information?
virtual void RestoreModelState ( FBModel pModel) [virtual]

Restore the saved model state onto pModel.

Parameters:
pModelModel to affect with previous state.
virtual void FreezeSRT ( FBModel pModel,
bool  pS,
bool  pR,
bool  pT 
) [virtual]

Freeze current model state.

Parameters:
pModelModel to freeze constraint on.
pSScaling freeze?
pRRotation freeze?
pTTranslation freeze?
virtual FBConstraint* Clone ( ) [virtual]

Clone the constraint.

Returns:
Newly created (and copied) constraint.

Reimplemented in FBCharacter.

int ReferenceGroupGetCount ( )

Return the number of reference groups.

Returns:
Number of reference groups.
int ReferenceGroupAdd ( const char *  pGroupName,
int  pMaxItemCount 
)

Add a group of references.

Parameters:
pGroupNameName of reference group to add.
pMaxItemCountMaximum number of items in pGroupName.
Returns:
Index of new reference group.
const char* ReferenceGroupGetName ( int  pGroupIndex)

Get the name of the reference group.

Parameters:
pGroupIndexIndex of the reference group to get the name for.
Returns:
The name of the reference group pGroupIndex.
int ReferenceGroupGetMaxCount ( int  pGroupIndex)

Get the maximum number of items that can exist in the reference group in question.

Parameters:
pGroupIndexIndex of reference group.
Returns:
Maximum number of items that can be added to the reference group.
FBModel* ReferenceGet ( int  pGroupIndex,
int  pItemIndex = 0 
)

Get a reference.

Parameters:
pGroupIndexIndex of reference group containing desired reference.
pItemIndexIndex of reference in group to get (default is 0).
Returns:
Model at specified reference.
int ReferenceGetCount ( int  pGroupIndex)

Get number of references in a specified group.

Parameters:
pGroupIndexIndex of group to query the number of references.
Returns:
Number of references in specified group.
bool ReferenceAdd ( int  pGroupIndex,
FBModel pModel 
)

Add a reference to a specified group.

Parameters:
pGroupIndexGroup to add reference to.
pModelModel to place at new reference.
Returns:
true if successful.
Warning:
If you try to add a model to a group that is already full, the success of the operation will be false and the reference will not be added.
bool ReferenceRemove ( int  pGroupIndex,
FBModel pModel 
)

Remove a reference to pModel from the group at pGroupIndex.

Parameters:
pGroupIndexIndex to remove reference from.
pModelModel to remove reference from.
Returns:
true if successful.
void ReferenceRemoveAll ( )

Remove All References.

virtual bool ReferenceAddNotify ( int  pGroupIndex,
FBModel pModel 
) [virtual]

Notification callbacks for when a reference is added or removed.

Parameters:
pGroupIndexIndex of group where reference was affected.
pModelModel to which reference was associated.
Returns:
true if successful.
virtual bool ReferenceRemoveNotify ( int  pGroupIndex,
FBModel pModel 
) [virtual]
virtual bool DeformerPreNotify ( FBModel pModel,
FBEvaluateInfo pEvaluateInfo,
FBVertex pBBoxMin,
FBVertex pBBoxMax 
) [virtual]

Deformation pre-notification function This function pass the evaluation information for deformation (if timing is required).

And user should provide the estimation of the bounding volume of the model after deformation. This estimation will be used to determine the model's visibility in the camera's frustum. Only those potential visible models will receive the following DeformerNotify() callback.

Parameters:
pModelModel to deform.
pEvaluateInfoInformation for evaluation.
pBBoxMin(In/Out) The estimation of min vertex of the bounding box before & after deformation
pBBoxMax(In/Out) The estimation of max vertex of the bounding box before & after deformation
Returns:
true if the deformer provide valid bbox estimation and wish reduce the following deformation if possible, false if deformer wish to continue deformation without considering frustum visibility.
virtual bool DeformerNotify ( FBModel pModel,
const FBVertex pSrcVertex,
const FBVertex pSrcNormal,
int  pCount,
FBVertex pDstVertex,
FBVertex pDstNormal 
) [virtual]

Deformation notification function.

Parameters:
pModelModel to deform.
pSrcVertexSource vertex array (i.e. vertex to deform).
pSrcNormalNormals at source vertex array.
pCountNumber of vertices in source/destination arrays
pDstVertexDestination vertex array (i.e. where source vertex gets deformed to)
pDstNormalNormals at destination vertex array.
Returns:
true if successful.
virtual bool DeformerBind ( FBModel pModel) [virtual]

Bind/Unbind pModel to deformation constraint.

These functions are used for adding/removing a deformation binding to/from pModel if the constraint is a deformation constraint.

Parameters:
pModelModel to bind/unbind.
Returns:
true if successful.
virtual bool DeformerUnBind ( FBModel pModel) [virtual]
virtual bool FbxStore ( FBFbxObject pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Store/Retrieve data to/from FBX files.

Parameters:
pFbxObjectInterface to FBX format.
pStoreWhatAttributes to store in FBX file.
Returns:
true if successful.

Reimplemented from FBBox.

virtual bool FbxRetrieve ( FBFbxObject pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Reimplemented from FBBox.


Member Data Documentation

Read Write Property: Is a deformer constraint?

Definition at line 335 of file fbconstraint.h.

Read Write Property: Does the constraint have a layout?

Definition at line 336 of file fbconstraint.h.

Read Write Property: Long description of constraint.

Definition at line 337 of file fbconstraint.h.

Read Write Property: Active state.

Definition at line 339 of file fbconstraint.h.

Read Write Property: Lock state.

Definition at line 340 of file fbconstraint.h.

Function Property: Snap constraint.

Definition at line 341 of file fbconstraint.h.

Read Write Property: Weight of constraint.

Reimplemented in FBStoryTrack.

Definition at line 342 of file fbconstraint.h.


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

FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint
FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint FBConstraint