Skip to content

Commit ecc5a34

Browse files
committed
TOVR 0.7
1 parent bb13a84 commit ecc5a34

File tree

11 files changed

+341
-198
lines changed

11 files changed

+341
-198
lines changed

Docs/EN/Functions/GetControllersData.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ Retrieves the state of the position, rotation, buttons, sticks and triggers of t
44
С++
55
```c
66
DWORD GetControllersData(
7-
__out TController *MyController,
8-
__out TController *MyController2
7+
__out TController *FirstController,
8+
__out TController *SecondController
99
);
1010
```
1111

1212
Delphi
1313
```pascal
1414
function GetControllersData(
15-
out myController, myController2: TController
15+
out FirstController, SecondController: TController
1616
): DWORD;
1717
```
1818

1919
#### Parameters
20-
MyController [out] - Pointer to an TController structure that receives the state of first controller.
21-
MyController2 [out] - Pointer to an TController structure that receives the state of second controller.
20+
FirstController [out] - Pointer to an TController structure that receives the state of first controller.
21+
SecondController [out] - Pointer to an TController structure that receives the state of second controller.
2222

2323
#### Structure TController
2424
C++
@@ -31,47 +31,51 @@ typedef struct _Controller
3131
double Yaw;
3232
double Pitch;
3333
double Roll;
34-
WORD Buttons;
35-
BYTE Trigger;
36-
SHORT ThumbX;
37-
SHORT ThumbY;
34+
unsigned short Buttons;
35+
float Trigger;
36+
float AxisX;
37+
float AxisY;
3838
} TController, *PController;
3939
```
4040

4141
Delphi
4242
```pascal
43-
PController = ^TController;
44-
_Controller = record
45-
X: double;
43+
PController = ^TController;
44+
_Controller = record
45+
X: double;
4646
Y: double;
4747
Z: double;
4848
Yaw: double;
4949
Pitch: double;
5050
Roll: double;
51-
Buttons: dword;
52-
Trigger: byte;
53-
ThumbX: smallint;
54-
ThumbY: smallint;
51+
Buttons: word;
52+
Trigger: single;
53+
AxisX: single;
54+
AxisY: single;
5555
end;
56+
Controller = _Controller;
57+
TController = Controller;
5658
```
5759

5860
| Type | Description | Values |
5961
| ------------- | ------------- | ------------- |
6062
| X, Y, Z | Position tracking | 0.000 (in meters) |
6163
| Yaw, Pitch, Roll | Rotation tracking | Between -180 and 180 (in degrees) |
62-
| Trigger | Analog trigger | Between 0 and 255 |
63-
| ThumbX | Thumbstick x-axis | Between -32768 and 32767 |
64-
| ThumbX | Thumbstick y-axis | Between -32768 and 32767 |
64+
| Trigger | Analog trigger | Between 0 and 1 |
65+
| AxisX | Thumbstick x-axis | Between -1 and 1 |
66+
| AxisY | Thumbstick y-axis | Between -1 and 1 |
6567

6668
#### Buttons
67-
Bitmask of the buttons controllers. A set bit indicates that the corresponding button is pressed.
69+
Bitmask of the buttons controllers. Set bit indicates that the corresponding button is pressed.
6870

6971
| Button | Bitmask |
7072
| ------------- | ------------- |
71-
| GRIPBTN | 0x0001 |
72-
| THUMBSTICKBTN | 0x0002 |
73-
| MENUBTN | 0x0004 |
74-
| SYSTEMBTN | 0x0008 |
73+
| GRIP_BTN | 0x0001 |
74+
| THUMB_BTN | 0x0002 |
75+
| A_BTN | 0x0004 |
76+
| B_BTN | 0x0008 |
77+
| MENU_BTN | 0x0010 |
78+
| SYS_BTN | 0x0020 |
7579

7680
#### Return value
77-
If the controllers are connected and the function succeeded, the return value is 1, otherwise 0.
81+
If the controllers are connected and the function succeeded, the return value is 0, otherwise 1.

Docs/EN/Functions/GetHMDData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ Retrieves the rotation and position state of HMD.
44
С++
55
```c
66
DWORD GetHMDData(
7-
__out THMD *myHMD
7+
__out THMD *MyHMD
88
);
99
```
1010

1111
Delphi
1212
```pascal
1313
function GetHMDData(
14-
out myHMD: THMD
14+
out MyHMD: THMD
1515
): DWORD;
1616
```
1717

1818
#### Parameters
19-
myHMD [out] - Pointer to an THMD structure that receives the state of HMD.
19+
MyHMD [out] - Pointer to an THMD structure that receives the state of HMD.
2020

2121
#### Structure THMD
2222
C++
@@ -65,4 +65,4 @@ qZ = sin(myYaw * 0.5) * cos(myRoll * 0.5) * cos(myPitch * 0.5) - cos(myYaw * 0.5
6565
```
6666
6767
#### Return value
68-
If the HMD is connected and the function succeeded, the return value is 1, otherwise 0.
68+
If the HMD is connected and the function succeeded, the return value is 0, otherwise 1.

Docs/EN/Functions/SetCentering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ function SetCentering(
1919
dwIndex - Device number, 0 - HMD, 1 and 2 - the first and second controllers.
2020

2121
#### Return value
22-
If the function succeeded, the return value is 1, otherwise 0.
22+
If the function succeeded, the return value is 0, otherwise 1.

Docs/EN/Functions/SetControllerData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ Sends data to a controller. Function is used to activate the feedback (vibration
55
```c
66
DWORD SetControllerData(
77
__in INT dwIndex,
8-
__in WORD MotorSpeed
8+
__in unsigned char MotorSpeed
99
);
1010
```
1111

1212
Delphi
1313
```pascal
1414
function SetControllerData(
1515
dwIndex: integer;
16-
MotorSpeed: word
16+
MotorSpeed: byte
1717
): DWORD;
1818
```
1919

2020
#### Parameters
2121
dwIndex - Controller number (1 or 2).
2222

23-
MotorSpeed - Vibration strength (from 0 to 65535).
23+
MotorSpeed - Vibration strength (from 0 to 255).
2424

2525
#### Return value
26-
If the controllers are connected and the function succeeded, the return value is 1, otherwise 0.
26+
If the controllers are connected and the function succeeded, the return value is 0, otherwise 1.

Docs/RU/Functions/GetControllersData.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
С++
55
```c
66
DWORD GetControllersData(
7-
__out TController *MyController,
8-
__out TController *MyController2
7+
__out TController *FirstController,
8+
__out TController *SecondController
99
);
1010
```
1111

1212
Delphi
1313
```pascal
1414
function GetControllersData(
15-
out myController, myController2: TController
15+
out FirstController, SecondController: TController
1616
): DWORD;
1717
```
1818

1919
#### Параметры
20-
MyController [out] - Указатель на структуру TController, которая получает текущее состояние первого контроллера.
21-
MyController2 [out] - Указатель на структуру TController, которая получает текущее состояние второго контроллера.
20+
FirstController [out] - Указатель на структуру TController, которая получает текущее состояние первого контроллера.
21+
SecondController [out] - Указатель на структуру TController, которая получает текущее состояние второго контроллера.
2222

2323
#### Структура TController
2424
C++
@@ -31,47 +31,51 @@ typedef struct _Controller
3131
double Yaw;
3232
double Pitch;
3333
double Roll;
34-
WORD Buttons;
35-
BYTE Trigger;
36-
SHORT ThumbX;
37-
SHORT ThumbY;
34+
unsigned short Buttons;
35+
float Trigger;
36+
float AxisX;
37+
float AxisY;
3838
} TController, *PController;
3939
```
4040

4141
Delphi
4242
```pascal
43-
PController = ^TController;
44-
_Controller = record
45-
X: double;
43+
PController = ^TController;
44+
_Controller = record
45+
X: double;
4646
Y: double;
4747
Z: double;
4848
Yaw: double;
4949
Pitch: double;
5050
Roll: double;
5151
Buttons: word;
52-
Trigger: byte;
53-
ThumbX: smallint;
54-
ThumbY: smallint;
52+
Trigger: single;
53+
AxisX: single;
54+
AxisY: single;
5555
end;
56+
Controller = _Controller;
57+
TController = Controller;
5658
```
5759

5860
| Тип | Описание | Значения |
5961
| ------------- | ------------- | ------------- |
6062
| X, Y, Z | Отслеживание позиции | 0.000 (в метрах) |
6163
| Yaw, Pitch, Roll | Отслеживание вращения | От -180 до 180 (в градусах) |
62-
| Trigger | Триггера контроллера | От 0 до 255 |
63-
| ThumbX | Ось X стика | От -32768 до 32767 |
64-
| ThumbX | Ось Y стика | От -32768 до 32767 |
64+
| Trigger | Триггера контроллера | От 0 до 1 |
65+
| AxisX | Ось X стика | От -1 до 1 |
66+
| AxisY | Ось Y стика | От -1 до 1 |
6567

6668
#### Buttons
6769
Битовая маска кнопок контроллеров. Установленный бит указывает, что нажата соответствующая кнопка.
6870

6971
| Кнопка | Битовая маска |
7072
| ------------- | ------------- |
71-
| GRIPBTN | 0x0001 |
72-
| THUMBSTICKBTN | 0x0002 |
73-
| MENUBTN | 0x0004 |
74-
| SYSTEMBTN | 0x0008 |
73+
| GRIP_BTN | 0x0001 |
74+
| THUMB_BTN | 0x0002 |
75+
| A_BTN | 0x0004 |
76+
| B_BTN | 0x0008 |
77+
| MENU_BTN | 0x0010 |
78+
| SYS_BTN | 0x0020 |
7579

7680
#### Возвращаемое значение
77-
Если контроллеры подключенены и функция успешно завершилась, возвращаемое значение равно 1, иначе 0.
81+
Если контроллеры подключенены и функция успешно завершилась, возвращаемое значение равно 0, иначе 1.

Docs/RU/Functions/GetHMDData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
С++
55
```c
66
DWORD GetHMDData(
7-
__out THMD *myHMD
7+
__out THMD *MyHMD
88
);
99
```
1010

1111
Delphi
1212
```pascal
1313
function GetHMDData(
14-
out myHMD: THMD
14+
out MyHMD: THMD
1515
): DWORD;
1616
```
1717

1818
#### Параметры
19-
myHMD [out] - Указатель на структуру THMD, которая получает текущее состояние шлема.
19+
MyHMD [out] - Указатель на структуру THMD, которая получает текущее состояние шлема.
2020

2121
#### Структура THMD
2222
C++
@@ -65,4 +65,4 @@ qZ = sin(myYaw * 0.5) * cos(myRoll * 0.5) * cos(myPitch * 0.5) - cos(myYaw * 0.5
6565
```
6666
6767
#### Возвращаемое значение
68-
Если шлем подключен и функция успешно завершилась, возвращаемое значение равно 1, иначе 0.
68+
Если шлем подключен и функция успешно завершилась, возвращаемое значение равно 0, иначе 1.

Docs/RU/Functions/SetCentering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ function SetCentering(
1919
dwIndex - Номер устройства, 0 - шлем, 1 и 2 - первый и второй контроллеры.
2020

2121
#### Возвращаемое значение
22-
Если функция успешно завершилась, возвращаемое значение равно 1, иначе 0.
22+
Если функция успешно завершилась, возвращаемое значение равно 0, иначе 1.

Docs/RU/Functions/SetControllerData.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
```c
66
DWORD SetControllerData(
77
__in INT dwIndex,
8-
__in WORD MotorSpeed
8+
__in unsigned char MotorSpeed
99
);
1010
```
1111

1212
Delphi
1313
```pascal
1414
function SetControllerData(
1515
dwIndex: integer;
16-
MotorSpeed: word
16+
MotorSpeed: byte
1717
): DWORD;
1818
```
1919

2020
#### Параметры
2121
dwIndex - Номер контроллера (1 или 2).
2222

23-
MotorSpeed - Сила вибрации (от 0 до 65535).
23+
MotorSpeed - Сила вибрации (от 0 до 255).
2424

2525
#### Возвращаемое значение
26-
Если контроллеры подключены и функция успешно завершилась, возвращаемое значение равно 1, иначе 0.
26+
Если контроллеры подключены и функция успешно завершилась, возвращаемое значение равно 0, иначе 1.

0 commit comments

Comments
 (0)