Open Reality Reference Guide
|
|
Go to the documentation of this file.
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);
326 IObject_Declare(
override);
375 FBHandle(
const char* pName, HIObject pObject=NULL );
451 #ifndef DOXYGEN_SHOULD_SKIP_THIS
490 #ifndef DOXYGEN_SHOULD_SKIP_THIS
689 #ifndef DOXYGEN_SHOULD_SKIP_THIS
819 FBDevice(
const char * pName,HIObject pObject=NULL);
826 virtual FBAnimationNode*
AnimationNodeInCreate (kReference pUserId,
const char * pName ,
const char * pDataType,
bool pIsPublic=
true,
double *pMin=NULL,
double *pMax=NULL,
bool pUserData=
false)
override;
827 virtual FBAnimationNode* AnimationNodeOutCreate(kReference pUserId,
const char * pName ,
const char * pDataType,
bool pIsPublic=
true,
double *pMin=NULL,
double *pMax=NULL,
bool pUserData=
false)
override;
910 IObject_Declare(
override );
950 friend class __FBDevice;
951 friend class DataFBDeviceOptical;
954 #ifndef FBSDK_LEAN_AND_MEAN
1083 #ifdef FBSDKUseNamespace
FBPropertyTime RecordingStartTime
Read Only Property: The time at which the recording started.
virtual void RemoveAt(int pIndex)
Remove the instrument at pIndex.
FBHandle class exposes the Handle object of the application.
PropertyList: ModelTemplateBinding.
FBHandle(const char *pName, HIObject pObject=NULL)
Public constructor.
ECandidateAction
Resolving action for candidates.
virtual bool DeviceOperation(kDeviceOperations pOperation)
Operate device.
void InitializeModelGeometry()
Initialize the hand model geometry.
FBPropertyDevice Device
Read Write Property: Handle to owner device.
void Select()
Meta selection.
@ kFBSoftwareTimestamp
The software will timestamp packets as they arrive.
virtual void AnimationNodesOutDisableIfNotWritten(FBEvaluateInfo *pEvaluateInfo)
This call will disable all out animation nodes from being pull by system (animation thread) for given...
virtual bool ModelTemplateBindNotify(FBModel *pModel, int pIndex, FBModelTemplate *pModelTemplate)
Model Template binding notification callback.
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
@ kFBModelTemplateCamera
Camera.
FBPropertyListModelTemplate Children
List: Children for object hierarchy.
FBPropertyListObject Image
List: Image to be used in the handle display. Only the image at position 0 is used.
kDeviceOperations
Types of operations for device.
void SetName(FBString pName)
Set the channel name.
FBDeviceInstrument(FBDevice *pDevice)
Constructor.
FBPropertyBool Live
Read Write Property: Is live?
FBModel * ModelBindingCreate()
Create a new model binding.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
FBEvaluateInfo & GetEvaluateInfo()
Return the evaluation info used to do device evaluation.
FBDeviceInstrument * operator[](int pIndex)
Get the model template at pIndex.
virtual bool DeviceEvaluationNotify(kTransportMode pMode, FBEvaluateInfo *pEvaluateInfo)
Real-Time engine thread: Output device evaluation.
FBPropertyString HardwareVersionInfo
Read Write Property: Device information: hardware version.
kDeviceIOs
Types of I/O for device.
FBDevice * operator[](int pIndex)
Get the device at pIndex.
@ kFBModelTemplateSkeleton
Skeleton limb.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
virtual void RecordingInitAnimation(FBAnimationNode *pAnimationNode) override
When recording, initialize animation.
FBPropertyModel Model
Read Write Property: Model being interfaced.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBTime GetTimeOfLastSync()
Last sync time.
@ kIOStopModeRead
Read from device (Transport=stopped).
int GetSyncCount()
Return sync count.
@ kPlayReady
Ready to play.
@ kFBCommTypeSharedMemory
Accessing shared memory.
Base Device class. Cannot be instantiated from Python.
A box is a fundamental building block in the application architecture.
@ kOpInit
Initalize device (creation).
@ kFBModelTemplateOptical
Optical model (not supported yet).
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Storage/Retrieval of information into the FBX file format.
FBPropertyBool LeftHand
Read Write Property: Left or right hand glove.
virtual void DeviceSendCommand(kDeviceOperations pOperation)
Send a command to the device.
@ kPreparePlay
Preparing to play.
void SetLocalTime(const FBTime &)
Set local time Allows the device to override the local time of the system.
virtual void DeviceIONotify(kDeviceIOs pAction, FBDeviceNotifyInfo &pDeviceNotifyInfo)
Real-Time engine thread: Device I/O.
FBAnimationNode * GetModelRotationNode(kHandModelPart pPartIndex)
Obtain the rotation animation node of a part of the hand model.
@ kFBModelTemplateRoot
Root (3 axes).
@ kFBModelTemplateLight
Light.
FBPropertyListObject Manipulate
List: Objects manipulated by the handle.
virtual void RecordingDoneAnimation(FBAnimationNode *pAnimationNode) override
When recording, finish animation.
FBPropertyModel ModelBindingRoot
Component: Root of model currently binded model hierarchy.
@ kFBModelTemplateCameraInterest
Camera interest.
FBModelTemplateStyle
Model template styles When creating model templates, this parameter will affect the actual model crea...
@ kFBModelTemplateMarker
Marker.
FBString Name
Name of channel.
kHandModelPart
Hand model parts.
FBDevice(const char *pName, HIObject pObject=NULL)
Constructor.
@ kFBModelTemplateNone
No style.
FBPropertyVector3d DefaultTranslation
Read Write Property: Default translation.
virtual FBAnimationNode * GetInConnector(int pIndex) const
Get the animation node input associated with the given index.
@ kFBModelTemplateNull
Null.
virtual int Add(FBDeviceInstrument *pItem)
Add an instrument to the property list.
PropertyList: ModelTemplate.
virtual bool AnimationNodeNotify(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo) override
Notification function for animation thread.
Device Input and Output Notification information structure.
FBDeviceSamplingMode
Recording types.
@ kFBCommTypeNetworkUDP
Network (UDP) device.
@ eCandidateIntercept
Intercept the candidate.
FBDeviceGlove(const char *pName, HIObject pObject=NULL)
Constructor.
virtual ECandidateAction SetStdCandidate(FBAnimationNode *pAnimationNode, double *pData, FBEvaluateInfo *pEvaluateInfo)
Function is call when a non-global candidate is set on an animation node.
virtual FBAnimationNode * AnimationNodeInGet()
Get the (IN/OUT) animation node for this box.
virtual void RecordingInitAnimation(FBAnimationNode *pAnimationNode)
When recording, initialize animation.
FBPropertyListObject ManipulateTranslation
List: Objects manipulated by the handle. Only their translation is affected.
@ kOpStop
Stop device (offline).
@ kOpAutoDetect
Autodetect (automatic).
virtual void RecordingDoneAnimation(FBAnimationNode *pAnimationNode)
When recording, finish animation.
FBX file format interface.
FBTime GetTimeOfNextSync()
Next sync time.
HIObject(* kFBObjectCreatorFnc)(HIObject pOwner, const char *pName, void *pData)
void Sync(int pSyncId)
Notify sync.
void AckOneBadSampleReceived()
Acknowlege that one bad sample was received (for statistical purposes).
const char * UniqueName
internal Unique name.
virtual bool ModelTemplateUnBindNotify(int pIndex, FBModelTemplate *pModelTemplate)
Model Template unbinding notification callback.
FBAnimationNode * operator[](int pIndex)
Get the binding at pIndex.
GloveChannel(FBAnimationNode *pAnimNode)
Constructor.
virtual int GetCount()
Get the number of instruments.
void AckOneSampleSent()
Acknowlege that one sample was sent (for statistical purposes).
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
virtual const char * FbxGetObjectSubType()
returns UniqueName if not overloaded.
FBPropertyDeviceSamplingMode SamplingMode
Read Write Property: Mode to use to record device.
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBModelTemplate * operator[](int pIndex)
Get the model template at pIndex.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Storage/Retrieval of information into the FBX file format.
virtual const char * FbxGetObjectType() override
Object Type "Device".
FBPropertyBool Animatable
Read Write Property: Is the box animatable.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
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 int Add(FBAnimationNode *pItem)
Add an animation node to the model template binding property list.
FBCommType
Communications type.
FBPropertyListObject Follow
List: Object to be followed by the handle. Should have a cardinality of 1.
int GetSyncCount()
Return the wanted timer sync count (internal or external)
FBPropertyTime SamplingPeriod
Read Write Property: Sampling period.
class K_DLLIMPORT FBPropertyBase< FBVector3d, kFBPT_Vector3D > FBPropertyVector3d
FBPropertyVector3d type definition.
virtual bool InstrumentWriteData(FBEvaluateInfo *pEvaluateInfo)
Write data to instrument's connectors.
FBModelTemplate(const char *pPrefix, const char *pName, FBModelTemplateStyle pStyle)
Constructor (no parent) from prefix, name, and style.
@ kPlayStop
Stopping play.
FBPropertyInt CommType
Read Write Property: Type of communications.
virtual bool FBCreate() override
Open Reality Creation function.
virtual int GetInConnectorCount() const
Get the number of animation node inputs for this box.
FBPropertyBool RecordMode
Read Write Property: Is recording?
@ kFBCommTypeSimulator
Software simulator.
kTransportMode
Transport control types for device.
FBTime & GetSystemTime()
Get system time.
FBBox(const char *pName, HIObject pObject=NULL)
Constructor.
@ kIOStopModeWrite
Write to device (Transport=stopped).
FBPropertyBool Online
Read Write Property: Is online?
virtual bool AnimationNodeIsUserData(FBAnimationNode *pAnimationNode)
Is the animation node user data?
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.
@ kFBCommTypeNetworkTCP
Network (TCP) device.
virtual int GetCount()
Get the number of model templates.
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.
FBTime & GetLocalTime()
Get local time.
FBPropertyVector3d DefaultRotation
Read Write Property: Default rotation.
PropertyEvent: Base event class.
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
@ eCandidateAccept
Let the standard system take care of the candidate.
FBPropertyString Status
Read Write Property: Device information: status.
@ kFBHardwareFrequency
Device is running at known, fixed frequency.
FBPropertyTime RecordingStopTime
Read Only Property: The time at which the recording stopped.
virtual int GetCount()
Get the number of bindings.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
@ kFBCommTypeNone
A non-communicating device.
virtual void InstrumentRecordFrame(FBTime pRecordTime, FBDeviceNotifyInfo &pNotifyInfo)
Record the data to the function curves for the instrument.
virtual ~GloveChannel()
Destructor,.
FBHandle * operator[](int pIndex)
Get the model template at pIndex.
FBAnimationNode * AnimNode
Animation node.
FBPropertyString Information
Read Write Property: Device information: information.
FBPropertyVector3d DefaultScaling
Read Write Property: Default scaling.
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
FBPropertyString Prefix
Read Write Property: Prefix of model template.
@ kIOPlayModeRead
Read from device (Transport=playing).
virtual bool EvaluateAnimationNodes(FBEvaluateInfo *pEvaluateInfo)
Evaluation of non TRS nodes that needs to be evaluated.
FBPropertyEvent OnStatusChange
Event: Status of device changed.
@ kFBCommTypeSerial
Serial communications.
virtual int GetOutConnectorCount() const
Get the number of animation node outputs for this box.
PropertyList: Concrete class for PropertyList of component
FBPropertyListDeviceInstrument Instruments
List: List of instruments.
FBModelTemplate ModelTemplate
Component: Root of model template structure.
Template class to contain an array of items.
FBModelTemplate(HIObject pObject=NULL)
Constructor from parent object.
FBPropertyBool Active
Read Write Property: Is instrument active?
int Add(FBModelTemplate *pItem)
Add a model template to the property list.
FBPropertyListObject ManipulateScaling
List: Objects manipulated by the handle. Only their scaling is affected.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyListObject ManipulateRotation
List: Objects manipulated by the handle. Only their rotation is affected.
@ kFBModelTemplateSensor
Yellow magnetic sensor.
FBPropertyBool Active
Read Write Property: Activate sync.
FBPropertyListModelTemplateBinding Bindings
List: Bindings for animation interface.
FBPropertyModelTemplate ModelTemplate
Read Write Property: Model template to build instruments' structure.
void AckOneSampleReceived()
Acknowlege that one sample was received (for statistical purposes).
@ kFBHardwareTimestamp
Device supplies timestamp.
Instrument abstraction layer.
virtual bool AnimationNodeDestroy(FBAnimationNode *pAnimationNode)
Destroy an animation node.
virtual const char * FbxGetObjectType()
Object Type "Box".
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
virtual void DeviceTransportNotify(kTransportMode pMode, FBTime pTime, FBTime pSystem)
Real-Time engine thread: Tranport notifications.
@ kOpReset
Reset device (stop->start).
virtual ECandidateAction SetGlobalCandidate(FBAnimationNode *pAnimationNode, double *pData, FBEvaluateInfo *pEvaluateInfo)
Function is call when a global candidate is set on an animation node.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override
Storage/Retrieval of information into the FBX file format.
FBArrayTemplate< GloveChannel * > Channels
Glove channels.
AnimationNodeNotify evaluation information.
Property class: const char * (String).
MotionBuilder SDK base class.
@ kFBCommTypeOther
Any other type of communications.
FBSyncReference(const char *pName, HIObject pObject=NULL)
Constructor.
virtual bool ResolveCandidate(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo)
Function is call when candidate needs to be resolved (like global to local).
virtual FBAnimationNode * GetOutConnector(int pIndex) const
Get the animation node output associated with the given index.
FBPropertyTime SamplingPeriod
Read Write Property: Set this to how many times a device is to be evaluated in one second....
void ModelBindingRootsList(FBModelList &pList)
Get the list of all the possible root models for binding.
@ kFBModelTemplateGeometry
Generic geometry.
FBString GetName()
Get the channel name.
virtual void RemoveAt(int pIndex)
Remove the binding at pIndex.
class K_DLLIMPORT FBPropertyBaseList< FBAnimationNode * > FBPropertyBaseListModelTemplateBinding
typedef class FBSDK_DLL FBPropertyBaseList< FBAnimationNode* > FBPropertyBaseListModelTemplateBinding
@ kFBAutoFrequency
Device is running at unknown, fixed frequency.
class K_DLLIMPORT FBVector3< double > FBVector3d
3D vector.
virtual void FBDestroy() override
Open Reality destruction function.
virtual bool AnimationNodeNotify(FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo)
Notification function for animation thread.
@ kOpStart
Start device (online).
bool Enabled
true if this channel is enabled.
virtual void RemoveAt(int pIndex)
Remove the model template at pIndex.