vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
Loading...
Searching...
No Matches
vrpn_Tracker_zSight.h
Go to the documentation of this file.
1
2
//
3
// Name: vrpn_Tracker_zSight.h
4
//
5
// Authors: David Borland
6
// Josep Maria Tomas Sanahuja
7
//
8
// EventLab at the University of Barcelona
9
//
10
// Description: VRPN tracker class for Sensics zSight HMD with built-in tracker. The tracker
11
// reports only orientation information, no position. It is interfaced to as
12
// a DirectX joystick, so VRPN_USE_DIRECTINPUT must be defined in
13
// vrpn_Configure.h to use it.
14
//
16
17
#ifndef VRPN_TRACKER_ZSIGHT
18
#define VRPN_TRACKER_ZSIGHT
19
20
// Make sure Direct Input is being used and atlbase is available for CComPtr.
21
#include "
vrpn_Configure.h
"
// IWYU pragma: keep
22
23
#if defined(_WIN32) && defined(VRPN_USE_DIRECTINPUT) && defined(VRPN_HAVE_ATLBASE)
24
25
#include "
vrpn_Tracker.h
"
26
27
#ifndef DIRECTINPUT_VERSION
28
#define DIRECTINPUT_VERSION 0x0800
29
#endif
30
#include <Winsvc.h>
31
#include <atlbase.h>
32
#include <dinput.h>
33
#include <windows.h>
34
35
class
vrpn_Tracker_zSight :
public
vrpn_Tracker
{
36
public
:
37
// Constructor
38
//
39
// name: VRPN tracker name
40
//
41
// c: VRPN connection to use
42
//
43
vrpn_Tracker_zSight(
const
char
* name,
vrpn_Connection
* c);
44
~vrpn_Tracker_zSight();
45
49
virtual
void
mainloop
();
50
51
protected
:
52
// VRPN tracker functions for generating and sending reports
53
virtual
void
get_report();
54
virtual
void
send_report();
55
56
// Initialize the device
57
HRESULT InitDevice();
58
59
// Callbacks for Direct Input
60
static
BOOL CALLBACK EnumSensicsCallback(
const
DIDEVICEINSTANCE* pdidInstance, VOID* selfPtr);
61
static
BOOL CALLBACK EnumObjectsCallback(
const
DIDEVICEOBJECTINSTANCE* pdidoi, VOID* selfPtr);
62
63
// Handle to the console window
64
HWND hWnd;
65
66
// The Direct Input and device handles
67
CComPtr<IDirectInput8> directInput;
68
CComPtr<IDirectInputDevice8> sensics;
69
};
70
71
72
#endif
73
#endif
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Tracker
Definition
vrpn_Tracker.h:49
vrpn_Connection
class VRPN_API vrpn_Connection
Definition
vrpn_3Space.h:7
vrpn_Configure.h
vrpn_Tracker.h
vrpn_Tracker_zSight.h
Generated by
1.17.0