Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
envrdevice.c
Go to the documentation of this file.
1 #ifdef GAME_TEMPLATE
2 
8 enum VRDeviceType
9 {
10  DEVICE_TYPE_OCULUS,
11  DEVICE_TYPE_PS4
12 }
13 
14 enum VRStatus
15 {
16  VR_STATUS_UNKNOWN, //< Unknown state, probably uninitialized.
17  VR_STATUS_VISIBLE, //< The HMD is being used for rendering.
18  VR_STATUS_PRESENT, //< The HMD port is open.
19  VR_STATUS_MOUNTED, //< The HMD is mounted on users head.
20  VR_STATUS_DISPLAY_LOST, //< The HMD was present and disappeared.
21  VR_STATUS_SHOULD_QUIT, //< Application requested exit.
22  VR_STATUS_SHOULD_RECENTER, //< The HMD Recenter request event was triggered.
23  VR_STATUS_TRACKED, //< The tracking data for the HMD are up to date.
24  VR_STATUS_CALIBRATING, //< The HMD is being calibrated.
25 }
26 
27 enum VRHandEnum
28 {
29  VR_HAND_LEFT, //< HMD controller left hand.
30  VR_HAND_RIGHT //< HMD controller right hand.
31 }
32 
33 enum VREye
34 {
35  VR_EYE_LEFT, // HMD left eye.
36  VR_EYE_RIGHT // HMD right eye.
37 }
38 
44 class VRDevice : Managed
45 {
50  proto native static VRDevice GetInstance();
51 
57  proto native VRStatus GetStatusFlags();
62  proto native owned string GetName();
67  proto native VRDeviceType GetDeviceType();
74  proto native void RecenterHeadTracking();
79  proto native vector GetHeadPosition();
84  proto native vector GetHeadOrientation();
91  proto native vector GetHandPosition(VRHand hand);
98  proto native vector GetHandOrientation(VRHand hand);
105  proto native vector GetEyePosition(VREye eye);
112  proto native vector GetEyeOrientation(VREye eye);
122  proto native void SetScale(float scale);
127  proto native float GetScale();
128 
135  proto external void GetEyeFOV(VREye eye, out float leftTan, out float rightTan, out float upTan, out float downTan);
136 };
137 
138 enum PSVrHeadRecenterFlagsEnum
139 {
140  VR_RECENTER_POSITION,
141  VR_RECENTER_ORIENTATION
142 }
143 
144 enum PSVrBrightnessRiskEnum
145 {
146  VR_BRIGHTNESS_RISK_LOW,
147  VR_BRIGHTNESS_RISK_HIGH,
148  VR_BRIGHTNESS_RISK_MAX
149 }
150 
151 enum PSVrTrackingQualityEnum
152 {
153  VR_TRACKING_QUALITY_NONE,
154  VR_TRACKING_QUALITY_NOT_VISIBLE,
155  VR_TRACKING_QUALITY_PARTIAL,
156  VR_TRACKING_QUALITY_FULL
157 }
158 
159 enum PSVrDialogStatusEnum
160 {
161  VR_DIALOG_UNKNOWN,
162  VR_DIALOG_OK,
163  VR_DIALOG_CANCELED,
164  VR_DIALOG_RUNNING
165 }
166 
170 class VRDevice_PS4 : VRDevice
171 {
184  proto native void Set2D(bool enabled);
189  proto native bool ShowHmdServiceDialog();
194  proto native bool ShowHmdSetupDialog();
199  proto native PSVrDialogStatusEnum GetSetupDialogStatus();
204  proto native PSVrDialogStatusEnum GetServiceDialogStatus();
205 
209  proto native void SetRecenterHeadFlags(PSVrHeadRecenterFlagsEnum flags);
214  proto native PSVrHeadRecenterFlagsEnum GetRecenterHeadFlags();
219  proto native vector GetEyeOffset(VREye eye);
226  proto native void SetMinOutputColor(int color);
233  proto native void SetEyeFOV(VREye eye, float leftTan, float rightTan, float upTan, float downTan);
237  proto native void ResetToDeviceFOV(VREye eye);
243  proto native void SetOversamplingFactor(float factor);
251  proto bool GetHmdTrackingStatus( out PSVrBrightnessRiskEnum bRisk,
252  out PSVrTrackingQualityEnum posQuality,
253  out PSVrTrackingQualityEnum orQuality);
263  proto bool GetMoveTrackingStatus( VRHand hand,
264  out PSVrBrightnessRiskEnum bRisk,
265  out PSVrTrackingQualityEnum posQuality,
266  out PSVrTrackingQualityEnum orQuality);
267 }
268 
272 class Oculus : VRDevice
273 {
274  // TODO:
275 }
276 
277 /*
278 * @}
279 */
280 
281 #endif
GetName
proto native owned string GetName()
Definition: syncedvalue.c:117
Managed
TODO doc.
Definition: enscript.c:117
vector
Definition: enconvert.c:105