Go to the
documentation of this file.
00001 #ifndef __FBTRACKER_H__
00002 #define __FBTRACKER_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00042 #include <kaydaradef.h>
00043 #ifndef FBSDK_DLL
00044
00047 #define FBSDK_DLL K_DLLIMPORT
00048 #endif
00049
00050 #include <fbsdk/fbcomponent.h>
00051 #include <fbsdk/fbcore.h>
00052
00053 #ifdef FBSDKUseNamespace
00054 namespace FBSDKNamespace {
00055 #endif
00056
00057
00058
00060 FBSDK_DLL FBTimeMode FBGetSyncTimeMode();
00061
00062
00063
00064 __FB_FORWARD( FBDeviceSyncPacket );
00070 class FBSDK_DLL FBDeviceSyncPacket : public FBComponent
00071 {
00072 __FBClassDeclare( FBDeviceSyncPacket, FBComponent );
00073 public:
00074 FBDeviceSyncPacket();
00075
00076 public:
00077 FBPropertyInt OriginalSync;
00078 FBPropertyInt CorrectedSync;
00079 FBPropertyInt DeviceSync;
00080 };
00081
00082
00083
00084 __FB_FORWARD( FBDeviceSync );
00089 class FBSDK_DLL FBDeviceSync : public FBDevice
00090 {
00091 __FBClassDeclare( FBDeviceSync, FBDevice );
00092 public:
00097 FBDeviceSync(char* pName, HIObject pObject=NULL);
00103 virtual void PrintDebugAnimInfo ( int pSync, FBDeviceSyncPacket* pSyncPacket, HFBEvaluateInfo pEvaluateInfo );
00108 virtual void PrintDebugIOInfo ( FBDeviceSyncPacket* pSyncPacket, FBDeviceNotifyInfo& pDeviceNotifyInfo );
00113 virtual void PrintDebugIONotifyInfo ( FBDeviceNotifyInfo& pInfo, int pPacketCount );
00114
00115
00116 virtual bool FBCreate ();
00117 virtual void FBDestroy ();
00118
00119
00120 virtual bool AnimationNodeNotify( HFBAnimationNode pAnimationNode, HFBEvaluateInfo pEvaluateInfo );
00121 virtual bool FbxStore ( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat );
00122 virtual bool FbxRetrieve ( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat );
00123
00130 virtual bool DeviceSyncAnimationNodeNotify( HFBAnimationNode pAnimationNode, HFBEvaluateInfo pEvaluateInfo, int pCorrectedSync ) = 0;
00131
00132
00139 virtual void PacketRegister( HFBDeviceSyncPacket pPacket );
00140
00141
00147 virtual HFBDeviceSyncPacket PacketLock ();
00156 virtual void PacketUnlock ( HFBDeviceSyncPacket pPacket, bool pValidPacket );
00157
00158
00168 virtual HFBDeviceSyncPacket PacketFetch( int pRequestedSync );
00174 virtual void PacketRelease( HFBDeviceSyncPacket pPacket );
00175
00176
00181 virtual HFBDeviceSyncPacket PacketRemove( int pPacketIndex );
00185 virtual int PacketGetCount();
00186
00187 public:
00188 FBPropertyInt PacketBufferSize;
00189 FBPropertyInt SyncDelay;
00190 FBPropertyBool DebugInfo;
00191 };
00192
00193
00194
00195 __FB_FORWARD( FBDeviceCameraPacket );
00199 class FBSDK_DLL FBDeviceCameraPacket : public FBDeviceSyncPacket
00200 {
00201 __FBClassDeclare( FBDeviceCameraPacket, FBDeviceSyncPacket );
00202 public:
00203 FBDeviceCameraPacket();
00204
00205 FBPropertyVector3d Position;
00206 FBPropertyVector3d Rotation;
00207 FBPropertyVector3d Offset;
00208 FBPropertyVector2d FieldOfView;
00209 FBPropertyVector2d OpticalCenter;
00210 FBPropertyDouble Focus;
00211 FBPropertyDouble Zoom;
00212 FBPropertyTime Time;
00213 };
00214 FB_DEFINE_COMPONENT( FBSDK_DLL, DeviceCameraPacket );
00215
00216
00217
00218 __FB_FORWARD( FBDeviceCameraInstrument );
00227 class FBSDK_DLL FBDeviceCameraInstrument : public FBDeviceInstrument
00228 {
00229 __FBClassDeclare( FBDeviceCameraInstrument, FBDeviceInstrument );
00230 public:
00234 FBDeviceCameraInstrument( HFBDevice pDevice );
00235
00240 virtual bool LoadLensTables( char* pFilename );
00247 virtual void ProcessLensData( FBDeviceCameraPacket* pDataPacket );
00248
00249
00250 virtual bool InstrumentWriteData( HFBEvaluateInfo pEvaluateInfo ) override;
00251 virtual void InstrumentRecordFrame( FBTime pRecordTime, FBDeviceNotifyInfo& pNotifyInfo ) override;
00252 virtual bool FbxStore( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat ) override;
00253 virtual bool FbxRetrieve( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat ) override;
00254
00255
00256 FBPropertyDeviceCameraPacket Packet;
00257 FBPropertyDeviceCameraPacket RecordPacket;
00258
00259 FBPropertyBool LensTableLoaded;
00260 FBPropertyString LensCalibrationFilename;
00261
00262 FBPropertyBool ManualFovMode;
00263 FBPropertyDouble ManualFovX;
00264 FBPropertyDouble ManualFovY;
00265 FBPropertyBool ManualCenterMode;
00266 FBPropertyDouble ManualCenterX;
00267 FBPropertyDouble ManualCenterY;
00268 FBPropertyBool LensFovInDegrees;
00269 FBPropertyBool InvertZoom;
00270 FBPropertyBool InvertFocus;
00271 FBPropertyDouble ZoomMultiplier;
00272 FBPropertyDouble NodalMultiplier;
00273 FBPropertyVector3d TranslationOffset;
00274 FBPropertyVector3d RotationOffset;
00275 FBPropertyDouble AspectRatio;
00276 };
00277
00278
00279
00280 __FB_FORWARD( FBDeviceCamera );
00286 class FBSDK_DLL FBDeviceCamera : public FBDeviceSync
00287 {
00288 __FBClassDeclare( FBDeviceCamera,FBDeviceSync );
00289 public:
00294 FBDeviceCamera(char *pName, HIObject pObject=NULL);
00295
00296
00297 virtual bool FBCreate ();
00298 virtual void FBDestroy ();
00299
00300
00301 virtual bool DeviceSyncAnimationNodeNotify ( HFBAnimationNode pAnimationNode, HFBEvaluateInfo pEvaluateInfo, int pCorrectedSync );
00302 virtual void DeviceIONotify ( kDeviceIOs pAction, FBDeviceNotifyInfo& pDeviceNotifyInfo );
00303 virtual bool ModelTemplateBindNotify( HFBModel pModel,int pIndex, HFBModelTemplate pModelTemplate );
00304 virtual bool FbxStore ( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat );
00305 virtual bool FbxRetrieve ( HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat );
00306 virtual void RecordingInitAnimation ( HFBAnimationNode pAnimationNode );
00307 virtual void RecordingDoneAnimation ( HFBAnimationNode pAnimationNode );
00308
00315 virtual bool DeviceCameraAnimationNodeNotify( HFBEvaluateInfo pEvaluateInfo, HFBDeviceCameraPacket pDstPacket, HFBDeviceSyncPacket pSrcPacket );
00322 virtual void DeviceCameraEvalData( FBDeviceNotifyInfo& pNotifyInfo );
00327 virtual void DeviceCameraRecordFrame( FBTime &pRecordTime, FBDeviceNotifyInfo& pNotifyInfo );
00332 virtual bool DeviceCameraWriteData( HFBEvaluateInfo pEvaluateInfo );
00337 virtual bool LoadLensTables( char* pFilename );
00344 virtual void ProcessLensData( HFBDeviceCameraPacket pDataPacket );
00345
00346 public:
00347 FBPropertyBool UsingCustomInstruments;
00348 FBPropertyInt NumberOfInstruments;
00349 FBPropertyString ModelTemplatePrefix;
00350 };
00351
00352 #ifdef FBSDKUseNamespace
00353 }
00354 #endif
00355 #endif