43 #include <kaydaradef.h>
48 #define FBSDK_DLL K_DLLIMPORT
55 #include <fbsdk/fbevaluateinfo.h>
62 #ifdef FBSDKUseNamespace
63 namespace FBSDKNamespace {
90 #define FBBoxDeclare( ClassName, Parent ) \
91 FBClassDeclare( ClassName,Parent ); \
93 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
99 #define FBBoxImplementation( ThisComponent ) \
100 FBClassImplementation( ThisComponent )
106 #define FBDeviceDeclare( ClassName, Parent ) \
107 FBClassDeclare( ClassName,Parent ); \
109 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
115 #define FBDeviceImplementation( ThisComponent ) \
116 FBClassImplementation( ThisComponent )
129 #define FBRegisterBox( UniqueNameStr, ClassName, FolderName, Label, Description, IconFilename ) \
130 HIObject RegisterBox##ClassName##Create( HIObject ,const char* pName,void * ) \
132 ClassName *Class = new ClassName(pName); \
133 Class->mAllocated = true; \
134 Class->UniqueName = UniqueNameStr; \
135 if (Class->FBCreate()) { \
136 return Class->GetHIObject(); \
143 FBLibraryModule( ClassName ) \
145 FBRegisterObject(ClassName##R1,"Boxes",UniqueNameStr,Description,RegisterBox##ClassName##Create,true, IconFilename );\
146 FBRegisterObject(ClassName##R2,"Boxes/Functions/" FolderName,Label,Description,RegisterBox##ClassName##Create,true, IconFilename );\
147 FBRegisterObject(ClassName##R3,"FbxStorable/Box",UniqueNameStr,Description,RegisterBox##ClassName##Create,true, IconFilename ); \
157 #define FBRegisterDevice( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
158 HIObject RegisterDevice##ClassName##Create( HIObject ,const char* pName,void * ) \
160 ClassName *Class = new ClassName(pName); \
161 Class->mAllocated = true; \
162 Class->UniqueName = UniqueNameStr; \
163 if (Class->FBCreate()) { \
164 return Class->GetHIObject(); \
171 FBLibraryModule( ClassName ) \
173 FBRegisterObject(ClassName##R1,"Boxes/Devices",Label,Description,RegisterDevice##ClassName##Create,true, IconFilename );\
174 FBRegisterObject(ClassName##R2,"FbxStorable/Device",UniqueNameStr,Description,RegisterDevice##ClassName##Create,true, IconFilename ); \
184 #define FBRegisterOnlineDevice( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
185 HIObject RegisterDevice##ClassName##Create( HIObject ,const char* pName,void * ) \
187 ClassName *Class = new ClassName(pName); \
188 Class->mAllocated = true; \
189 Class->UniqueName = UniqueNameStr; \
190 if (Class->FBCreate()) { \
191 return Class->GetHIObject(); \
198 FBLibraryModule( ClassName ) \
200 if( FBGetLicense() >= kFBLicenseOnline ) \
202 FBRegisterObject(ClassName##R1,"Boxes/Devices",Label,Description,RegisterDevice##ClassName##Create, true, IconFilename );\
203 FBRegisterObject(ClassName##R2,"FbxStorable/Device",UniqueNameStr,Description,RegisterDevice##ClassName##Create, true, IconFilename ); \
225 FBBox(
const char* pName, HIObject pObject=NULL);
232 eCandidateInterceptAfterEvaluation
247 virtual FBAnimationNode* AnimationNodeOutCreate (kReference pUserId,
const char * pName ,
const char * pDataType,
bool pIsPublic=
false,
double *pMin=NULL,
double *pMax=NULL,
bool pUserData=
false);
334 IObject_Declare(
override);
383 FBHandle(
const char* pName, HIObject pObject=NULL );
459 #ifndef DOXYGEN_SHOULD_SKIP_THIS
498 #ifndef DOXYGEN_SHOULD_SKIP_THIS
697 #ifndef DOXYGEN_SHOULD_SKIP_THIS
847 FBDevice(
const char * pName,HIObject pObject=NULL);
854 virtual FBAnimationNode*
AnimationNodeInCreate (kReference pUserId,
const char * pName ,
const char * pDataType,
bool pIsPublic=
true,
double *pMin=NULL,
double *pMax=NULL,
bool pUserData=
false)
override;
855 virtual FBAnimationNode* AnimationNodeOutCreate(kReference pUserId,
const char * pName ,
const char * pDataType,
bool pIsPublic=
true,
double *pMin=NULL,
double *pMax=NULL,
bool pUserData=
false)
override;
941 IObject_Declare(
override );
981 friend class __FBDevice;
982 friend class DataFBDeviceOptical;
985 #ifndef FBSDK_LEAN_AND_MEAN
1114 #ifdef FBSDKUseNamespace
Template class to contain an array of items.
A box is a fundamental building block in the application architecture.
virtual ECandidateAction SetStdCandidate(FBAnimationNode *pAnimationNode, double *pData, FBEvaluateInfo *pEvaluateInfo)
Function is call when a non-global candidate is set on an animation node.
virtual const char * FbxGetObjectType()
Returns the class type inherited by the class of an object, for example: 'Box', 'Constraint',...
FBPropertyBool Live
Read Write Property: Is live?
virtual int GetInConnectorCount() const
Get the number of animation node inputs for this box.
virtual bool EvaluateAnimationNodes(FBEvaluateInfo *pEvaluateInfo)
Evaluation of non TRS nodes that needs to be evaluated.
virtual FBAnimationNode * GetOutConnector(int pIndex) const
Get the animation node output associated with the given index.
virtual int GetOutConnectorCount() const
Get the number of animation node outputs for this box.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Storage/Retrieval of information into the FBX file format.
virtual FBAnimationNode * GetInConnector(int pIndex) const
Get the animation node input associated with the given index.
FBBox(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyBool RecordMode
Read Write Property: Is recording?
ECandidateAction
Resolving action for candidates.
@ eCandidateAccept
Let the standard system take care of the candidate.
@ eCandidateIntercept
Intercept the candidate.
virtual bool AnimationNodeDestroy(FBAnimationNode *pAnimationNode)
Destroy an animation node.
virtual ECandidateAction SetGlobalCandidate(FBAnimationNode *pAnimationNode, double *pData, FBEvaluateInfo *pEvaluateInfo)
Function is call when a global candidate is set on an animation node.
virtual bool AnimationNodeIsUserData(FBAnimationNode *pAnimationNode)
Is the animation node user data?
const char * UniqueName
internal Unique name.
virtual FBAnimationNode * AnimationNodeInCreate(kReference pUserId, const char *pName, const char *pDataType, bool pIsPublic=false, double *pMin=NULL, double *pMax=NULL, bool pUserData=false)
Creation of IN/OUT Animation Nodes.
virtual bool AnimationNodeNotify(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo)
Notification function for animation thread.
FBPropertyBool Animatable
Read Write Property: Is the box animatable.
virtual const char * FbxGetObjectSubType()
Returns the class sub type inherited by the class of an object, for example: 'Relations',...
virtual FBAnimationNode * AnimationNodeInGet()
Get the (IN/OUT) animation node for this box.
virtual void AnimationNodesOutDisableIfNotWritten(FBEvaluateInfo *pEvaluateInfo)
This call will disable all out animation nodes from being pull by system (animation thread) for given...
virtual bool ResolveCandidate(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo)
Function is call when candidate needs to be resolved (like global to local).
MotionBuilder SDK base class.
void SetName(FBString pName)
Set the channel name.
bool Enabled
true if this channel is enabled.
virtual ~GloveChannel()
Destructor,.
GloveChannel(FBAnimationNode *pAnimNode)
Constructor.
FBString Name
Name of channel.
FBString GetName()
Get the channel name.
FBAnimationNode * AnimNode
Animation node.
FBArrayTemplate< GloveChannel * > Channels
Glove channels.
FBDeviceGlove(const char *pName, HIObject pObject=NULL)
Constructor.
kHandModelPart
Hand model parts.
virtual void RecordingDoneAnimation(FBAnimationNode *pAnimationNode) override
When recording, finish animation.
void InitializeModelGeometry()
Initialize the hand model geometry.
FBPropertyBool LeftHand
Read Write Property: Left or right hand glove.
FBAnimationNode * GetModelRotationNode(kHandModelPart pPartIndex)
Obtain the rotation animation node of a part of the hand model.
virtual void RecordingInitAnimation(FBAnimationNode *pAnimationNode) override
When recording, initialize animation.
void VectorToModelPartAngle(kHandModelPart pPartIndex, FBVector3d &pVector)
Bring the vector in parameter to a valid angle range of rotation for a given part of the hand model.
FBModelTemplate ModelTemplate
Component: Root of model template structure.
virtual bool ModelTemplateUnBindNotify(int pIndex, FBModelTemplate *pModelTemplate)
Model Template unbinding notification callback.
virtual bool AnimationNodeNotify(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo) override
Notification function for animation thread.
FBPropertyModel ModelBindingRoot
Component: Root of model currently binded model hierarchy.
FBPropertyTime RecordingStartTime
Read Only Property: The time at which the recording started.
virtual void RecordingInitAnimation(FBAnimationNode *pAnimationNode)
When recording, initialize animation.
kTransportMode
Transport control types for device.
@ kPreparePlay
Preparing to play.
@ kPlayStop
Stopping play.
@ kPlayReady
Ready to play.
virtual void DeviceSendCommand(kDeviceOperations pOperation)
Send a command to the device.
virtual void FBDestroy() override
Open Reality destruction function.
FBPropertyListDeviceInstrument Instruments
List: List of instruments.
void AckOneSampleSent()
Acknowlege that one sample was sent (for statistical purposes).
FBPropertyString HardwareVersionInfo
Read Write Property: Device information: hardware version.
virtual const char * FbxGetObjectType() override
Returns the class type inherited by the class of an object, for example: 'Device'.
FBPropertyString Status
Read Write Property: Device information: status.
FBPropertyInt CommType
Read Write Property: Type of communications.
FBModel * ModelBindingCreate()
Create a new model binding.
virtual void DeviceIONotify(kDeviceIOs pAction, FBDeviceNotifyInfo &pDeviceNotifyInfo)
Real-Time engine thread: Device I/O.
FBPropertyEvent OnStatusChange
Event: Status of device changed.
FBPropertyTime RecordingStopTime
Read Only Property: The time at which the recording stopped.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override
Storage/Retrieval of information into the FBX file format.
void AckOneBadSampleReceived()
Acknowlege that one bad sample was received (for statistical purposes).
virtual FBAnimationNode * AnimationNodeInCreate(kReference pUserId, const char *pName, const char *pDataType, bool pIsPublic=true, double *pMin=NULL, double *pMax=NULL, bool pUserData=false) override
Creation of IN/OUT Animation Nodes.
kDeviceIOs
Types of I/O for device.
@ kIOStopModeRead
Read from device (Transport=stopped).
@ kIOPlayModeRead
Read from device (Transport=playing).
@ kIOStopModeWrite
Write to device (Transport=stopped).
virtual void DeviceTransportNotify(kTransportMode pMode, FBTime pTime, FBTime pSystem)
Real-Time engine thread: Tranport notifications.
virtual bool ModelTemplateBindNotify(FBModel *pModel, int pIndex, FBModelTemplate *pModelTemplate)
Model Template binding notification callback.
void ModelBindingRootsList(FBModelList &pList)
Get the list of all the possible root models for binding.
virtual bool DeviceOperation(kDeviceOperations pOperation)
Operate device.
kDeviceOperations
Types of operations for device.
@ kOpStart
Start device (online).
@ kOpInit
Initalize device (creation).
@ kOpAutoDetect
Autodetect (automatic).
@ kOpReset
Reset device (stop->start).
@ kOpStop
Stop device (offline).
virtual bool FBCreate() override
Open Reality Creation function.
FBPropertyDeviceSamplingMode SamplingMode
Read Write Property: Mode to use to record device.
virtual bool DeviceEvaluationNotify(kTransportMode pMode, FBEvaluateInfo *pEvaluateInfo)
Real-Time engine thread: Output device evaluation.
void AckOneSampleReceived()
Acknowlege that one sample was received (for statistical purposes).
FBPropertyBool Online
Read Write Property: Is online?
FBDevice(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyString Information
Read Write Property: Device information: information.
FBPropertyTime SamplingPeriod
Read Write Property: Set this to how many times a device is to be evaluated in one second....
virtual void RecordingDoneAnimation(FBAnimationNode *pAnimationNode)
When recording, finish animation.
Instrument abstraction layer.
FBPropertyModelTemplate ModelTemplate
Read Write Property: Model template to build instruments' structure.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Storage/Retrieval of information into the FBX file format.
FBDeviceInstrument(FBDevice *pDevice)
Constructor.
FBPropertyDevice Device
Read Write Property: Handle to owner device.
virtual bool InstrumentWriteData(FBEvaluateInfo *pEvaluateInfo)
Write data to instrument's connectors.
virtual void InstrumentRecordFrame(FBTime pRecordTime, FBDeviceNotifyInfo &pNotifyInfo)
Record the data to the function curves for the instrument.
FBPropertyBool Active
Read Write Property: Is instrument active?
Device Input and Output Notification information structure.
void SetLocalTime(const FBTime &)
Set local time Allows the device to override the local time of the system.
FBTime & GetLocalTime()
Get local time.
FBEvaluateInfo & GetEvaluateInfo()
Return the evaluation info used to do device evaluation.
FBTime & GetSystemTime()
Get system time.
int GetSyncCount()
Return the wanted timer sync count (internal or external)
AnimationNodeNotify evaluation information.
FBHandle class exposes the Handle object of the application.
FBPropertyListObject Follow
List: Object to be followed by the handle. Should have a cardinality of 1.
FBPropertyListObject ManipulateScaling
List: Objects manipulated by the handle. Only their scaling is affected.
FBHandle(const char *pName, HIObject pObject=NULL)
Public constructor.
FBPropertyListObject ManipulateTranslation
List: Objects manipulated by the handle. Only their translation is affected.
FBPropertyListObject Image
List: Image to be used in the handle display. Only the image at position 0 is used.
void Select()
Meta selection.
FBPropertyListObject Manipulate
List: Objects manipulated by the handle.
FBPropertyListObject ManipulateRotation
List: Objects manipulated by the handle. Only their rotation is affected.
FBPropertyListModelTemplate Children
List: Children for object hierarchy.
FBModelTemplate(const char *pPrefix, const char *pName, FBModelTemplateStyle pStyle)
Constructor (no parent) from prefix, name, and style.
FBPropertyListModelTemplateBinding Bindings
List: Bindings for animation interface.
FBPropertyModel Model
Read Write Property: Model being interfaced.
FBPropertyVector3d DefaultRotation
Read Write Property: Default rotation.
FBPropertyString Prefix
Read Write Property: Prefix of model template.
FBModelTemplate(HIObject pObject=NULL)
Constructor from parent object.
FBPropertyVector3d DefaultScaling
Read Write Property: Default scaling.
FBPropertyVector3d DefaultTranslation
Read Write Property: Default translation.
PropertyEvent: Base event class.
PropertyList: Concrete class for PropertyList of component
FBDevice * operator[](int pIndex)
Get the device at pIndex.
virtual void RemoveAt(int pIndex)
Remove the instrument at pIndex.
virtual int Add(FBDeviceInstrument *pItem)
Add an instrument to the property list.
FBDeviceInstrument * operator[](int pIndex)
Get the model template at pIndex.
virtual int GetCount()
Get the number of instruments.
FBHandle * operator[](int pIndex)
Get the model template at pIndex.
PropertyList: ModelTemplateBinding.
virtual void RemoveAt(int pIndex)
Remove the binding at pIndex.
FBAnimationNode * operator[](int pIndex)
Get the binding at pIndex.
virtual int Add(FBAnimationNode *pItem)
Add an animation node to the model template binding property list.
virtual int GetCount()
Get the number of bindings.
PropertyList: ModelTemplate.
virtual void RemoveAt(int pIndex)
Remove the model template at pIndex.
FBModelTemplate * operator[](int pIndex)
Get the model template at pIndex.
int Add(FBModelTemplate *pItem)
Add a model template to the property list.
virtual int GetCount()
Get the number of model templates.
Property class: const char * (String).
FBTime GetTimeOfLastSync()
Last sync time.
void Sync(int pSyncId)
Notify sync.
FBSyncReference(const char *pName, HIObject pObject=NULL)
Constructor.
FBTime GetTimeOfNextSync()
Next sync time.
FBPropertyBool Active
Read Write Property: Activate sync.
int GetSyncCount()
Return sync count.
FBPropertyTime SamplingPeriod
Read Write Property: Sampling period.
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBCommType
Communications type.
@ kFBCommTypeNetworkUDP
Network (UDP) device.
@ kFBCommTypeOther
Any other type of communications.
@ kFBCommTypeNetworkTCP
Network (TCP) device.
@ kFBCommTypeSerial
Serial communications.
@ kFBCommTypeSimulator
Software simulator.
@ kFBCommTypeNone
A non-communicating device.
@ kFBCommTypeSharedMemory
Accessing shared memory.
class K_DLLIMPORT FBPropertyBaseList< FBAnimationNode * > FBPropertyBaseListModelTemplateBinding
typedef class FBSDK_DLL FBPropertyBaseList< FBAnimationNode* > FBPropertyBaseListModelTemplateBinding
FBDeviceSamplingMode
Recording types.
@ kFBAutoFrequency
Device is running at unknown, fixed frequency.
@ kFBSoftwareTimestamp
The software will timestamp packets as they arrive.
@ kFBHardwareTimestamp
Device supplies timestamp.
@ kFBHardwareFrequency
Device is running at known, fixed frequency.
FBModelTemplateStyle
Model template styles When creating model templates, this parameter will affect the actual model crea...
@ kFBModelTemplateLight
Light.
@ kFBModelTemplateGeometry
Generic geometry.
@ kFBModelTemplateSensor
Yellow magnetic sensor.
@ kFBModelTemplateCamera
Camera.
@ kFBModelTemplateSkeleton
Skeleton limb.
@ kFBModelTemplateOptical
Optical model (not supported yet).
@ kFBModelTemplateRoot
Root (3 axes).
@ kFBModelTemplateNone
No style.
@ kFBModelTemplateCameraInterest
Camera interest.
@ kFBModelTemplateNull
Null.
@ kFBModelTemplateMarker
Marker.
HIObject(* kFBObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBX file format interface.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class K_DLLIMPORT FBPropertyBase< FBVector3d, kFBPT_Vector3D > FBPropertyVector3d
FBPropertyVector3d 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 FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
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.