Rise
The Vieneo Province
FreeTrack.h
Go to the documentation of this file.
1 #pragma once
2 
3 /********************************************************************
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14 ********************************************************************/
15 
16 #include <WinSock2.h>
17 #include <WS2tcpip.h>
18 #include <Windows.h>
19 
20 #include "../Logger.h"
21 
22 class Viewscreen;
23 
24 class FreeTrack
25 {
28 
29  HINSTANCE hinstLib;
30 
32  {
33  unsigned long int dataID;
34  long int camWidth;
35  long int camHeight;
36 
37  float yaw;
38  float pitch;
39  float roll;
40  float x;
41  float y;
42  float z;
43 
44  float rawyaw;
45  float rawpitch;
46  float rawroll;
47  float rawx;
48  float rawy;
49  float rawz;
50 
51  float x1;
52  float y1;
53  float x2;
54  float y2;
55  float x3;
56  float y3;
57  float x4;
58  float y4;
59  };
60 
61  // DLL function signatures
62  // These match those given in FTTypes.pas
63  // WINAPI is macro for __stdcall defined somewhere in the depths of windows.h
64  typedef bool (WINAPI *importGetData)(FreeTrackData * data);
65  typedef char *(WINAPI *importGetDllVersion)();
66  typedef void (WINAPI *importReportID)(int name);
67  typedef char *(WINAPI *importProvider)();
68 
69  // declare imported function pointers
74 
75  // create variables for exchanging data with the dll
78 
79 public:
80  float x = 0.0f, y = 0.0f, z = 0.0f;
81 
82  FreeTrack(Viewscreen* prmViewscreen);
83  void Poll();
84  ~FreeTrack();
85 };
Logger * logger
Definition: FreeTrack.h:27
void Poll()
Definition: FreeTrack.cpp:50
bool(WINAPI * importGetData)(FreeTrackData *data)
Definition: FreeTrack.h:64
char *(WINAPI * importGetDllVersion)()
Definition: FreeTrack.h:65
Definition: Logger.h:9
HINSTANCE hinstLib
Definition: FreeTrack.h:29
importReportID reportID
Definition: FreeTrack.h:72
importProvider provider
Definition: FreeTrack.h:73
char *(WINAPI * importProvider)()
Definition: FreeTrack.h:67
float x
Definition: FreeTrack.h:80
Viewscreen * viewscreen
Definition: FreeTrack.h:26
importGetData getData
Definition: FreeTrack.h:70
void(WINAPI * importReportID)(int name)
Definition: FreeTrack.h:66
float z
Definition: FreeTrack.h:80
FreeTrackData data
Definition: FreeTrack.h:76
importGetDllVersion getDllVersion
Definition: FreeTrack.h:71
float y
Definition: FreeTrack.h:80
FreeTrack(Viewscreen *prmViewscreen)
Definition: FreeTrack.cpp:5
FreeTrackData * pData
Definition: FreeTrack.h:77
unsigned long int dataID
Definition: FreeTrack.h:33