1 #ifndef __FBCONSTRAINT_H__
2 #define __FBCONSTRAINT_H__
45 #include <kaydaradef.h>
50 #define FBSDK_DLL K_DLLIMPORT
56 #ifdef FBSDKUseNamespace
57 namespace FBSDKNamespace {
69 #define FBRegisterConstraint( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
70 HIObject RegisterConstraint##ClassName##Create( HIObject ,const char* pName,void * ) \
72 ClassName *Class = new ClassName(pName); \
73 Class->UniqueName = UniqueNameStr; \
74 if (Class->FBCreate()) { \
75 return Class->GetHIObject(); \
82 FBLibraryModule( ClassName ) \
84 FBRegisterObject( ClassName##R1,"Constraints",Label,Description,RegisterConstraint##ClassName##Create,true, IconFilename ); \
85 FBRegisterObject( ClassName##R2,"FbxStorable/Constraint",UniqueNameStr,Description,RegisterConstraint##ClassName##Create,true, IconFilename ); \
93 #define FBConstraintDeclare( ClassName, Parent ) \
94 FBClassDeclare( ClassName, Parent ); \
96 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
102 #define FBConstraintImplementation( ThisComponent ) \
103 FBClassImplementation( ThisComponent )
143 IObject_Declare(
override);
284 virtual bool ReferenceRemoveNotify (
int pGroupIndex,
FBModel* pModel );
322 virtual bool DeformerUnBind (
FBModel* pModel );
391 #ifndef DOXYGEN_SHOULD_SKIP_THIS
394 inline virtual int Add (
FBComponent* pItem ) {
return Add((
FBBox*)pItem); }
462 IObject_Declare(
override);
520 #define FBRegisterConstraintSolver( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
521 HIObject RegisterConstraintSolver##ClassName##Create( HIObject ,const char* pName,void * ) \
523 ClassName *Class = new ClassName(pName); \
524 Class->UniqueName = UniqueNameStr; \
525 if (Class->FBCreate()) { \
526 return Class->GetHIObject(); \
533 FBLibraryModule( ClassName ) \
535 FBRegisterObject( ClassName##R1,"Browsing/Templates/Solvers",Label,Description,RegisterConstraintSolver##ClassName##Create,true, IconFilename ); \
536 FBRegisterObject( ClassName##R2,"FbxStorable/Constraint",UniqueNameStr,Description,RegisterConstraintSolver##ClassName##Create,true, IconFilename ); \
544 #define FBConstraintSolverDeclare( ClassName, Parent ) \
545 FBClassDeclare( ClassName, Parent ); \
547 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
553 #define FBConstraintSolverImplementation( ThisComponent ) \
554 FBClassImplementation( ThisComponent )
595 void MultiThreaded(
bool pActive );
596 bool IsMultiThreaded();
601 virtual void LiveChanged();
633 #define FBRegisterPhysicalProperties( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
634 HIObject RegisterPhysicalProperties##ClassName##Create( HIObject ,const char* pName,void * ) \
636 ClassName *Class = new ClassName(pName); \
637 if (Class->FBCreate()) { \
638 return Class->GetHIObject(); \
645 FBLibraryModule( ClassName ) \
647 FBRegisterObject( ClassName##R1,"Browsing/Templates/Physical Properties",Label,Description,RegisterPhysicalProperties##ClassName##Create,true, IconFilename ); \
648 FBRegisterObject( ClassName##R2,"FbxStorable/Physical Properties",UniqueNameStr,Description,RegisterPhysicalProperties##ClassName##Create,true, IconFilename ); \
656 #define FBPhysicalPropertiesDeclare( ClassName, Parent ) \
657 FBClassDeclare( ClassName, Parent ); \
659 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
665 #define FBPhysicalPropertiesImplementation( ThisComponent ) \
666 FBClassImplementation( ThisComponent )
751 #ifdef FBSDKUseNamespace
A box is a fundamental building block in the application architecture.
Wrapper around a specific instance of a FBBox object.
FBBoxPlaceHolder(HIObject pObject)
Constructor.
FBPropertyBox Box
Read Only Property: Underlying box object.
MotionBuilder SDK base class.
Base class for constraints.
virtual void SaveModelState(FBModel *pModel, bool pS, bool pR, bool pT)
Save current state of pModel.
virtual void SnapSuggested()
Suggest 'snap'.
FBPropertyBool Lock
Read Write Property: Lock state.
FBAnimationNode * AnimationNodeInCreate(kReference pUserId, FBProperty *pProperty)
Animation Node Creations (IN).
virtual void SetupAllAnimationNodes()
Setup animation nodes.
bool ReferenceRemove(int pGroupIndex, FBModel *pModel)
Remove a reference to pModel from the group at pGroupIndex.
void ReferenceRemoveAll()
Remove All References.
FBAnimationNode * AnimationNodeOutCreate(kReference pUserId, FBModel *pModel, const char *pAttribute)
Animation Node Creations (IN/OUT).
virtual bool DeformerPreNotify(FBModel *pModel, FBEvaluateInfo *pEvaluateInfo, FBVertex *pBBoxMin, FBVertex *pBBoxMax)
Deformation pre-notification function This function pass the evaluation information for deformation (...
bool ReferenceAdd(int pGroupIndex, FBModel *pModel)
Add a reference to a specified group.
int ReferenceGroupGetMaxCount(int pGroupIndex)
Get the maximum number of items that can exist in the reference group in question.
FBModel * ReferenceGet(int pGroupIndex, int pItemIndex=0)
Get a reference.
FBPropertyString Description
Read Write Property: Long description of constraint.
FBConstraint(const char *pName, HIObject pObject=NULL)
Constructor.
const char * ReferenceGroupGetName(int pGroupIndex)
Get the name of the reference group.
virtual bool Enable(FBModel *pModel)
Enable constraint on pModel.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override
Store/Retrieve data to/from FBX files.
virtual bool AnimationNodeNotify(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo, FBConstraintInfo *pConstraintInfo)
Notification callback for connectors.
FBPropertyBool HasLayout
Read Write Property: Does the constraint have a layout?
virtual bool DeformerBind(FBModel *pModel)
Bind/Unbind pModel to deformation constraint.
virtual void FreezeSRT(FBModel *pModel, bool pS, bool pR, bool pT)
Freeze current model state.
virtual bool DeformerNotify(FBModel *pModel, const FBVertex *pSrcVertex, const FBVertex *pSrcNormal, int pCount, FBVertex *pDstVertex, FBVertex *pDstNormal)
Deformation notification function.
virtual void ActiveChanged()
Notification for Activation Status Change.
FBPropertyAction Snap
Function Property: Snap constraint.
int ReferenceGroupGetCount()
Return the number of reference groups.
virtual FBConstraint * Clone()
Clone the constraint.
FBPropertyBool Deformer
Read Write Property: Is a deformer constraint?
int ReferenceGetCount(int pGroupIndex)
Get number of references in a specified group.
FBPropertyBool Active
Read Write Property: Active state.
virtual void RemoveAllAnimationNodes()
Remove animation nodes.
virtual bool ReferenceAddNotify(int pGroupIndex, FBModel *pModel)
Notification callbacks for when a reference is added or removed.
FBPropertyAnimatableDouble Weight
Read Write Property: Weight of constraint.
virtual bool Disable(FBModel *pModel)
Disable constraint on pModel.
virtual void RestoreModelState(FBModel *pModel)
Restore the saved model state onto pModel.
int ReferenceGroupAdd(const char *pGroupName, int pMaxItemCount)
Add a group of references.
virtual void FreezeSuggested()
Suggest 'freeze'.
Constraint information class.
bool GetZeroRequested()
Was a 'zero' requested?
bool GetSnapRequested()
Was a 'snap' requested?
FBConstraint * TypeCreateConstraint(const char *pName)
Create a constraint by name.
static FBConstraintManager & TheOne()
Get the global FBConstraintManager object.
FBConstraint * TypeCreateConstraint(int pTypeIndex)
Create a constraint by index.
FBConstraintManager()
Constructor.
int TypeGetCount() const
Get the number of registered constraint types.
const char * TypeGetName(int pTypeIndex) const
Get the name of a registered type of constraint.
ConstraintRelation class.
bool GetBoxPosition(FBBox *pBox, int &pX, int &pY)
Get a box position in the GUI.
FBBox * SetAsSource(FBBox *pSource)
Create a sender box.
bool SetBoxPosition(FBBox *pBox, int pX, int pY)
Set a box position in the GUI.
FBPropertyListBox Boxes
List: Boxes used in this constraint.
FBBox * CreateFunctionBox(const char *pGroup, const char *pName)
Create a function box.
FBBox * ConstrainObject(FBBox *pConstrainedObject)
Create a receiver box.
FBConstraintRelation(const char *pName, HIObject pObject=NULL)
Constructor.
Base class for constraint solver.
bool BackgroundEvaluateInfoNotify(FBEvaluateInfo *pBackgroundEvaluateInfo, kBackgroundEvaluationCallback pFunction, void *pCustomData=NULL)
Enable evaluation notification.
void BackgroundEvaluateInfoEnd(FBEvaluateInfo *pBackgroundEvaluateInfo)
Release background evaluation info - very important.
FBPropertyInt SampleRecordingPrecision
Read Write Property: Sample Recording Precision?
FBEvaluateInfo * BackgroundEvaluateInfoBegin(FBEvaluateInfo *pSourceEvaluateInfo, bool pEvaluateCandidates=false)
Start background evaluation.
FBEvaluateInfo * BackgroundEvaluateInfoRecursiveBegin(FBEvaluateInfo *pSourceEvaluateInfo, bool pForceUpdateLocals=false)
Start recursive background evaluation.
FBPropertyBool SyncAnimationPlay
Read Write Property: Sync animation play speed with solver? (for computation expensive scenes this wi...
AnimationNodeNotify evaluation information.
Wrapper around a specific instance of a FBModel object.
FBPropertyBool UseGlobalTransforms
Read Write Property: Indicate if the translations are expressed in local or global mode.
FBModelPlaceHolder(HIObject pObject)
Constructor.
FBPropertyModel Model
Read Only Property: Underlying model object.
Base class for physical properties attach to a model.
Property: Action Action property to trigger function.
Property: Base property class.
List: Box informations for constraint relation.
virtual void RemoveAt(int pIndex)
Remove FBBox object from property list.
virtual int GetCount()
Get the number of objects.
virtual FBBox * operator[](int pIndex)
Get the FBBox object at pIndex.
int Add(FBBox *pItem)
Add a FBBox object to the property list.
PropertyList: Concrete class for PropertyList of component
FBConstraint * operator[](int pIndex)
Get the constraint at pIndex.
PropertyList: Constraint solver
FBConstraint * operator[](int pIndex)
Get the model template at pIndex.
PropertyList: Physical properties
FBPhysicalProperties * operator[](int pIndex)
Get the model template at pIndex.
Property class: const char * (String).
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Contains definitions for devices, boxes and models.
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class K_DLLIMPORT FBPropertyBaseAnimatable< double, kFBPT_double > FBPropertyAnimatableDouble
FBPropertyBaseAnimatableDouble type definition.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
class K_DLLIMPORT FBVector4< float > FBVertex
Vertex.
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
class K_DLLIMPORT FBVector3< double > FBVector3d
3D vector.