fbcore.h File Reference

This reference page is linked to from the following overview topics: Skeleton mocap: deviceskeleton, Model templates.


Contains definitions for devices, boxes and models. More...

#include <kaydaradef.h>
#include <fbsdk/fbcomponent.h>
#include <fbsdk/fbfbx.h>
#include <fbsdk/fbtime.h>
#include <fbsdk/fbdata.h>
#include <fbsdk/fbevaluateinfo.h>

Go to the source code of this file.

Classes

class  FBBox
 A box is a fundamental building block in the application architecture. More...
class  FBHandle
 FBHandle class exposes the Handle object of the application. More...
class  FBPropertyListHandle
 PropertyList: Handle. More...
class  FBPropertyListModelTemplate
 PropertyList: ModelTemplate. More...
class  FBPropertyListModelTemplateBinding
 PropertyList: ModelTemplateBinding. More...
class  FBModelTemplate
 Model template class. More...
class  FBPropertyListDevice
 PropertyList: Device More...
class  FBDeviceNotifyInfo
 Device Input and Output Notification information structure. More...
class  FBDeviceInstrument
 Instrument abstraction layer. More...
class  FBPropertyListDeviceInstrument
 List of instruments. More...
class  FBSyncReference
 Application sync. More...
class  FBDevice
 Base Device class. Cannot be instantiated from Python. More...
class  FBDeviceGlove
 Base Glove class. More...
class  FBDeviceGlove::GloveChannel
 Base GloveChannel. More...

Defines

#define FBSDK_DLL   K_DLLIMPORT
 Be sure that FBSDK_DLL is defined only once...
#define FBBoxDeclare(ClassName, Parent)
 Box declaration.
#define FBBoxImplementation(ThisComponent)   FBClassImplementation( ThisComponent )
 Box implementation.
#define FBDeviceDeclare(ClassName, Parent)
 Device declaration.
#define FBDeviceImplementation(ThisComponent)   FBClassImplementation( ThisComponent )
 Device implementation.
#define FBRegisterBox(UniqueNameStr, ClassName, FolderName, Label, Description, IconFilename)
 Register a box class.
#define FBRegisterDevice(UniqueNameStr, ClassName, Label, Description, IconFilename)
 Register a device class.
#define FBRegisterOnlineDevice(UniqueNameStr, ClassName, Label, Description, IconFilename)
 Register an online device class.

Typedefs

typedef HIObject(* kFBObjectCreatorFnc )(HIObject pOwner, const char *pName, void *pData)
typedef class FBSDK_DLL
FBPropertyBaseList
< FBAnimationNode * > 
FBPropertyBaseListModelTemplateBinding
 typedef class FBSDK_DLL FBPropertyBaseList< FBAnimationNode* > FBPropertyBaseListModelTemplateBinding
typedef class FBSDK_DLL
FBArrayTemplate< FBModel * > 
FBModelList

Enumerations

enum  FBModelTemplateStyle {
  kFBModelTemplateNone, kFBModelTemplateNull, kFBModelTemplateMarker, kFBModelTemplateRoot,
  kFBModelTemplateSensor, kFBModelTemplateSkeleton, kFBModelTemplateCamera, kFBModelTemplateGeometry,
  kFBModelTemplateCameraInterest, kFBModelTemplateLight, kFBModelTemplateOptical
}
 

Model template styles When creating model templates, this parameter will affect the actual model created (associated with the model template).

More...
enum  FBDeviceSamplingMode { kFBHardwareTimestamp, kFBHardwareFrequency, kFBAutoFrequency, kFBSoftwareTimestamp }
 

Recording types.

More...
enum  FBCommType {
  kFBCommTypeNone = 0, kFBCommTypeSerial = 1<<0, kFBCommTypeNetworkTCP = 1<<1, kFBCommTypeNetworkUDP = 1<<2,
  kFBCommTypeSharedMemory = 1<<3, kFBCommTypeSimulator = 1<<4, kFBCommTypeOther = 1<<5
}
 

Communications type.

More...

Functions

 FB_DEFINE_COMPONENT (FBSDK_DLL, ModelTemplate)
 FB_DEFINE_COMPONENT (FBSDK_DLL, Device)
 FB_DEFINE_COMPONENT (FBSDK_DLL, Path3D)
 FB_DEFINE_COMPONENT (FBSDK_DLL, Scene)
 FB_DEFINE_COMPONENT (FBSDK_DLL, Model)
 __FB_FORWARD (FBBox)
 FB_FORWARD (FBFbxObject)
 __FB_FORWARD (FBHandle)
 FB_DEFINE_LIST (FBSDK_DLL, Handle)
 FB_FORWARD (FBPropertyListHandle)
 __FB_FORWARD (FBModelTemplate)
 __FB_FORWARD (FBPropertyListModelTemplate)
 FB_DEFINE_LIST (FBSDK_DLL, ModelTemplate)
 __FB_FORWARD (FBModelTemplateBinding)
 __FB_FORWARD (FBPropertyListModelTemplateBinding)
 __FB_FORWARD (FBDevice)
 __FB_FORWARD (FBPropertyListDevice)
 FB_FORWARD (FBDeviceNotifyInfo)
 __FB_FORWARD (FBDeviceInstrument)
 FB_DEFINE_COMPONENT (FBSDK_DLL, DeviceInstrument)
 __FB_FORWARD (FBPropertyListDeviceInstrument)
 FB_DEFINE_LIST (FBSDK_DLL, DeviceInstrument)
 __FB_FORWARD (FBSyncReference)
 FB_DEFINE_COMPONENT (FBSDK_DLL, SyncReference)
 FB_DEFINE_ENUM (FBSDK_DLL, DeviceSamplingMode)
 __FB_FORWARD (FBDeviceGlove)

Detailed Description

Contains definitions for devices, boxes and models.

Definition in file fbcore.h.


Define Documentation

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 48 of file fbcore.h.

#define FBBoxDeclare (   ClassName,
  Parent 
)
Value:
FBClassDeclare( ClassName,Parent ); \
public: \
    ClassName(const char* pName):Parent(pName) { FBClassInit; } \
private:

Box declaration.

Parameters:
ClassNameName of box class.
ParentParent class of ClassName.

Definition at line 90 of file fbcore.h.

#define FBBoxImplementation (   ThisComponent)    FBClassImplementation( ThisComponent )

Box implementation.

Parameters:
ThisComponentName of box class to implement.

Definition at line 99 of file fbcore.h.

#define FBDeviceDeclare (   ClassName,
  Parent 
)
Value:
FBClassDeclare( ClassName,Parent ); \
public: \
    ClassName(const char* pName):Parent(pName) { FBClassInit; } \
private:

Device declaration.

Parameters:
ClassNameName of device class.
ParentParent class of ClassName.

Definition at line 106 of file fbcore.h.

#define FBDeviceImplementation (   ThisComponent)    FBClassImplementation( ThisComponent )

Device implementation.

Parameters:
ThisComponentName of device class to implement.

Definition at line 115 of file fbcore.h.

#define FBRegisterBox (   UniqueNameStr,
  ClassName,
  FolderName,
  Label,
  Description,
  IconFilename 
)
Value:
HIObject RegisterBox##ClassName##Create( HIObject /*pOwner*/,const char* pName,void * /*pData*/) \
    { \
    ClassName *Class = new ClassName(pName); \
    Class->mAllocated = true; \
    Class->UniqueName = UniqueNameStr; \
    if (Class->FBCreate()) { \
    return Class->GetHIObject(); \
    } else { \
    delete Class; \
    return NULL; \
    } \
    } \
    \
    FBLibraryModule( ClassName )    \
    {\
    FBRegisterObject(ClassName##R1,"Boxes",UniqueNameStr,Description,RegisterBox##ClassName##Create,true, IconFilename );\
    FBRegisterObject(ClassName##R2,"Boxes/Functions/"FolderName,Label,Description,RegisterBox##ClassName##Create,true, IconFilename );\
    FBRegisterObject(ClassName##R3,"FbxStorable/Box",UniqueNameStr,Description,RegisterBox##ClassName##Create,true, IconFilename ); \
    }

Register a box class.

Parameters:
UniqueNameStrUnique name of class.
ClassNameName of box class.
FolderNameDirectory structure within the application.
LabelShort description.
DescriptionLong description.
IconFilenameName of the file containing the icon.

Definition at line 129 of file fbcore.h.

#define FBRegisterDevice (   UniqueNameStr,
  ClassName,
  Label,
  Description,
  IconFilename 
)
Value:
HIObject RegisterDevice##ClassName##Create( HIObject /*pOwner*/,const char* pName,void * /*pData*/) \
    { \
    ClassName *Class = new ClassName(pName); \
    Class->mAllocated = true; \
    Class->UniqueName = UniqueNameStr; \
    if (Class->FBCreate()) { \
    return Class->GetHIObject(); \
    } else { \
    delete Class; \
    return NULL; \
    } \
    } \
    \
    FBLibraryModule( ClassName )    \
    {   \
    FBRegisterObject(ClassName##R1,"Boxes/Devices",Label,Description,RegisterDevice##ClassName##Create,true, IconFilename );\
    FBRegisterObject(ClassName##R2,"FbxStorable/Device",UniqueNameStr,Description,RegisterDevice##ClassName##Create,true, IconFilename ); \
    }

Register a device class.

Parameters:
UniqueNameStrUnique name of class.
ClassNameName of device class.
LabelShort description.
DescriptionLong description.
IconFilenameName of the file containing the icon.

Definition at line 157 of file fbcore.h.

#define FBRegisterOnlineDevice (   UniqueNameStr,
  ClassName,
  Label,
  Description,
  IconFilename 
)
Value:
HIObject RegisterDevice##ClassName##Create( HIObject /*pOwner*/,const char* pName,void * /*pData*/) \
    { \
    ClassName *Class = new ClassName(pName); \
    Class->mAllocated = true; \
    Class->UniqueName = UniqueNameStr; \
    if (Class->FBCreate()) { \
    return Class->GetHIObject(); \
    } else { \
    delete Class; \
    return NULL; \
    } \
    } \
    \
    FBLibraryModule( ClassName )    \
    {   \
    if( FBGetLicense() >= kFBLicenseOnline )    \
    {   \
    FBRegisterObject(ClassName##R1,"Boxes/Devices",Label,Description,RegisterDevice##ClassName##Create, true, IconFilename );\
    FBRegisterObject(ClassName##R2,"FbxStorable/Device",UniqueNameStr,Description,RegisterDevice##ClassName##Create, true, IconFilename ); \
    }   \
    }

Register an online device class.

Parameters:
UniqueNameStrUnique name of class.
ClassNameName of device class.
LabelShort description.
DescriptionLong description.
IconFilenameName of the file containing the icon.

Definition at line 184 of file fbcore.h.


Typedef Documentation

Parameters:
pOwnerObject that own this new object
pNameName of the object
pDataData put in the object

Definition at line 81 of file fbcore.h.

typedef class FBSDK_DLL FBPropertyBaseList< FBAnimationNode* > FBPropertyBaseListModelTemplateBinding

Definition at line 413 of file fbcore.h.

typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList

Definition at line 722 of file fbcore.h.


Enumeration Type Documentation

Model template styles When creating model templates, this parameter will affect the actual model created (associated with the model template).

Enumerator:
kFBModelTemplateNone 

No style.

kFBModelTemplateNull 

Null.

kFBModelTemplateMarker 

Marker.

kFBModelTemplateRoot 

Root (3 axes).

kFBModelTemplateSensor 

Yellow magnetic sensor.

kFBModelTemplateSkeleton 

Skeleton limb.

kFBModelTemplateCamera 

Camera.

kFBModelTemplateGeometry 

Generic geometry.

kFBModelTemplateCameraInterest 

Camera interest.

kFBModelTemplateLight 

Light.

kFBModelTemplateOptical 

Optical model (not supported yet).

Definition at line 456 of file fbcore.h.

Recording types.

The different values for this will control the way the keys are added when the device is being recorded. There are four different types of recording keys for devices:

  • Hardware Timestamping. This case is when the hardware provides timestamps with each packet.
  • Hardware Frequency. The hardware is guaranteed to provide packets at a given frequency.
  • Auto Frequency Packets are coming in at a fixed, unknown frequency. The recorded data will be resampled to be equidistant.
  • Software Timestamping. The application will provide a timestamp for each packet depending on when it receives the data.
Enumerator:
kFBHardwareTimestamp 

Device supplies timestamp.

kFBHardwareFrequency 

Device is running at known, fixed frequency.

kFBAutoFrequency 

Device is running at unknown, fixed frequency.

kFBSoftwareTimestamp 

The software will timestamp packets as they arrive.

Definition at line 700 of file fbcore.h.

enum FBCommType

Communications type.

Different base types of communications. There is always the 'other' type in order to use another type of communication.

Enumerator:
kFBCommTypeNone 

A non-communicating device.

kFBCommTypeSerial 

Serial communications.

kFBCommTypeNetworkTCP 

Network (TCP) device.

kFBCommTypeNetworkUDP 

Network (UDP) device.

kFBCommTypeSharedMemory 

Accessing shared memory.

kFBCommTypeSimulator 

Software simulator.

kFBCommTypeOther 

Any other type of communications.

Definition at line 712 of file fbcore.h.


Function Documentation

FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
ModelTemplate   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
Device   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
Path3D   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
Scene   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
Model   
)
__FB_FORWARD ( FBBox  )
FB_DEFINE_LIST ( FBSDK_DLL  ,
Handle   
)
FB_DEFINE_LIST ( FBSDK_DLL  ,
ModelTemplate   
)
__FB_FORWARD ( FBModelTemplateBinding  )
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
DeviceInstrument   
)
FB_DEFINE_LIST ( FBSDK_DLL  ,
DeviceInstrument   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
SyncReference   
)
FB_DEFINE_ENUM ( FBSDK_DLL  ,
DeviceSamplingMode   
)