Google VR Types
Various types used in the Google VR NDK.
Summary
Typedefs |
|
---|---|
gvr_audio_source_id
|
typedefint32_t
Sound object and sound field identifier. |
gvr_context
|
typedefstruct gvr_context_
Primary context for invoking Google VR APIs. |
gvr_user_prefs
|
typedefstruct gvr_user_prefs_
|
Enumerations
Anonymous Enum 0
Anonymous Enum 0
Flags indicating the current status of the tracker.
See also GVR_PROPERTY_TRACKING_STATUS.
Properties | |
---|---|
GVR_TRACKING_STATUS_FLAG_HAS_6DOF
|
The tracker pose is derived from 6DoF sensors and has a translational component. |
GVR_TRACKING_STATUS_FLAG_INITIALIZING
|
The tracker is still initializing, so the pose may not be accurate. |
GVR_TRACKING_STATUS_FLAG_INVALID
|
The tracker is in an invalid (potentially paused) state, or no valid tracker exists. |
Anonymous Enum 1
Anonymous Enum 1
Controller API options (bit flags).
Properties | |
---|---|
GVR_CONTROLLER_ENABLE_ACCEL
|
Indicates that controller accelerometer data should be reported. |
GVR_CONTROLLER_ENABLE_ARM_MODEL
|
Indicates that elbow model should be enabled if the system doesn't provide real position data. |
GVR_CONTROLLER_ENABLE_BATTERY
|
Indicates that controller battery data should be reported. |
GVR_CONTROLLER_ENABLE_GESTURES
|
Indicates that controller gestures should be reported. |
GVR_CONTROLLER_ENABLE_GYRO
|
Indicates that controller gyroscope data should be reported. |
GVR_CONTROLLER_ENABLE_ORIENTATION
|
Indicates that controller orientation data should be reported. |
GVR_CONTROLLER_ENABLE_POSE_PREDICTION
|
Indicates that controller pose prediction should be enabled. |
GVR_CONTROLLER_ENABLE_POSITION
|
Indicates that system should provide real position data if available. |
GVR_CONTROLLER_ENABLE_TOUCH
|
Indicates that controller touchpad data should be reported. |
Anonymous Enum 2
Anonymous Enum 2
Properties | |
---|---|
GVR_AUDIO_INVALID_SOURCE_ID
|
Invalid source id that can be used to initialize source id variables during construction. |
GVR_BUFFER_INDEX_EXTERNAL_SURFACE
|
Special index for a source buffer that has the same contents as the external surface attached to the given viewport. Pass this to gvr_buffer_viewport_set_source_buffer_index() to use the external surface as the buffer contents. |
GVR_EXTERNAL_SURFACE_ID_NONE
|
Constant that represents a nonexistent external surface. Pass to gvr_buffer_viewport_set_external_surface_id() to disable sampling from an external surface. |
gvr_arm_model_behavior
gvr_arm_model_behavior
Types of gaze behaviors used for arm model.
gvr_audio_distance_rolloff_type
gvr_audio_distance_rolloff_type
Distance rolloff models used for distance attenuation.
Properties | |
---|---|
GVR_AUDIO_ROLLOFF_LINEAR
|
Linear distance rolloff model. |
GVR_AUDIO_ROLLOFF_LOGARITHMIC
|
Logarithmic distance rolloff model. |
GVR_AUDIO_ROLLOFF_NONE
|
No distance attenuation will be applied. |
gvr_audio_material_type
gvr_audio_material_type
Room surface material names, used to set room properties.
gvr_audio_rendering_mode
gvr_audio_rendering_mode
Rendering modes define CPU load / rendering quality balances.
Properties | |
---|---|
GVR_AUDIO_RENDERING_BINAURAL_HIGH_QUALITY
|
HRTF-based rendering over a virtual array of 16 loudspeakers arranged in an approximate equidistribution about the around the listener’s head. |
GVR_AUDIO_RENDERING_BINAURAL_LOW_QUALITY
|
HRTF-based rendering over a virtual array of 8 loudspeakers arranged in a cube configuration around the listener’s head. |
GVR_AUDIO_RENDERING_STEREO_PANNING
|
Stereo panning of all Sound Objects. This disables HRTF-based rendering. |
gvr_audio_surround_format_type
gvr_audio_surround_format_type
Supported surround sound formats.
gvr_color_format_type
gvr_color_format_type
Valid color formats for swap chain buffers.
Properties | |
---|---|
GVR_COLOR_FORMAT_RGBA_8888
|
Equivalent to GL_RGBA8. Pixel values are expected to be premultiplied with alpha. |
GVR_COLOR_FORMAT_RGB_565
|
Equivalent to GL_RGB565. |
gvr_controller_api_status
gvr_controller_api_status
Constants that represent the status of the controller API.
Properties | |
---|---|
GVR_CONTROLLER_API_CLIENT_OBSOLETE
|
The underlying VR service is too new, is incompatible with current client. |
GVR_CONTROLLER_API_MALFUNCTION
|
The underlying VR service is malfunctioning. Try again later. |
GVR_CONTROLLER_API_NOT_AUTHORIZED
|
This app was not authorized to use the service (e.g., missing permissions, the app is blacklisted by the underlying service, etc). |
GVR_CONTROLLER_API_OK
|
API is happy and healthy. This doesn't mean the controller itself is connected, it just means that the underlying service is working properly. |
GVR_CONTROLLER_API_SERVICE_OBSOLETE
|
The underlying VR service is too old, needs upgrade. |
GVR_CONTROLLER_API_UNAVAILABLE
|
The underlying VR service is not present. |
GVR_CONTROLLER_API_UNSUPPORTED
|
Any other status represents a permanent failure that requires external action to fix: API failed because this device does not support controllers (API is too low, or other required feature not present). |
gvr_controller_battery_level
gvr_controller_battery_level
Controller battery states.
Properties | |
---|---|
GVR_CONTROLLER_BATTERY_LEVEL_COUNT
|
Note: there are 5 distinct levels, but there are 6 due to the inclusion of an UNKNOWN state before any battery information is collected, etc. |
gvr_controller_button
gvr_controller_button
Controller buttons.
Properties | |
---|---|
GVR_CONTROLLER_BUTTON_CLICK
|
Touchpad Click. |
GVR_CONTROLLER_BUTTON_COUNT
|
Note: there are 8 buttons on the controller, but the state arrays have this many elements due to the inclusion of a dummy "none" button. |
gvr_controller_connection_state
gvr_controller_connection_state
Constants that represent the state of the controller.
Properties | |
---|---|
GVR_CONTROLLER_CONNECTED
|
Controller is connected. |
GVR_CONTROLLER_CONNECTING
|
Controller is connecting. |
GVR_CONTROLLER_DISCONNECTED
|
Controller is disconnected. |
GVR_CONTROLLER_SCANNING
|
Controller is scanning. |
gvr_controller_handedness
gvr_controller_handedness
gvr_depth_stencil_format_type
gvr_depth_stencil_format_type
Properties | |
---|---|
GVR_DEPTH_STENCIL_FORMAT_DEPTH_16
|
Equivalent to GL_DEPTH_COMPONENT16. |
GVR_DEPTH_STENCIL_FORMAT_DEPTH_24
|
Equivalent to GL_DEPTH_COMPONENT24. |
GVR_DEPTH_STENCIL_FORMAT_DEPTH_24_STENCIL_8
|
Equivlaent to GL_DEPTH24_STENCIL8. |
GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F
|
Equivalent to GL_DEPTH_COMPONENT32F. |
GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F_STENCIL_8
|
Equivalent to GL_DEPTH_32F_STENCIL8. |
GVR_DEPTH_STENCIL_FORMAT_NONE
|
No depth or stencil buffer. |
GVR_DEPTH_STENCIL_FORMAT_STENCIL_8
|
Equivalent to GL_STENCIL8. |
gvr_error
gvr_error
Constants that represent GVR error codes.
Properties | |
---|---|
GVR_ERROR_NO_EVENT_AVAILABLE
|
Error code indicating that no events are currently available. See also gvr_poll_event() |
GVR_ERROR_NO_PROPERTY_AVAILABLE
|
Error code indicating that the given property is not available. See also gvr_properties_get(). |
gvr_event_type
gvr_event_type
The type of gvr_event.
Properties | |
---|---|
GVR_EVENT_HEAD_TRACKING_PAUSED
|
Notification that head tracking was paused. Event data type: none |
GVR_EVENT_HEAD_TRACKING_RESUMED
|
Notification that head tracking was resumed (or started for the first time). Before this event is sent, head tracking will always return the identity pose. This event is usually preceded in the same frame by a GVR_EVENT_RECENTER of recenter_type GVR_RECENTER_EVENT_RESTART. Event data type: none |
GVR_EVENT_RECENTER
|
Notification that head tracking has been recentered. (Note that controller recentering is signaled separately through gvr_controller_state_get_recentered().) Event data type: gvr_recenter_event_data |
GVR_EVENT_SAFETY_REGION_ENTER
|
Notification that the user has re-entered the safety region, as defined by the gvr_safety_region_type. Event data type: none |
GVR_EVENT_SAFETY_REGION_EXIT
|
Notification that the user has exited the safety region, as defined by the gvr_safety_region_type. Event data type: none |
gvr_eye
gvr_eye
An enum for the left and right eye.
gvr_feature
gvr_feature
Types of VR-specific features which may or may not be supported on the underlying platform.
Properties | |
---|---|
GVR_FEATURE_ASYNC_REPROJECTION
|
Asynchronous reprojection warps the app's rendered frame using the most recent head pose just before pushing the frame to the display. |
GVR_FEATURE_EXTERNAL_SURFACE
|
Support for external surface creation and compositing. Note that this feature may be supported only under certain configurations, e.g., when async reprojection is explicitly enabled. |
GVR_FEATURE_HARDWARE_BUFFERS
|
Indicates that buffers which are part of a frame are backed by Android AHardwareBuffer objects. When this feature is available, the function gvr_frame_get_hardware_buffer can be called to get the AHardwareBuffer pointer. Hardware buffers are only supported on Android O and later, on a best-effort basis. Future versions of GVR and/or Android may also cease to support hardware buffers if the underlying implementation no longer supports this rendering path. |
GVR_FEATURE_HEAD_POSE_6DOF
|
Support for providing head poses with 6 degrees-of-freedom (orientation and position). |
GVR_FEATURE_MULTIVIEW
|
Support for framebuffers suitable for rendering with the GL_OVR_multiview2 and GL_OVR_multiview_multisampled_render_to_texture extensions. |
gvr_property_type
gvr_property_type
Property types exposed by the gvr_properties_get() API.
Properties | |
---|---|
GVR_PROPERTY_RECENTER_TRANSFORM
|
The current transform that maps from headset's "sensor" space to the recentered "start" space. Apps can optionally undo or extend this transform to perform custom recentering logic with the SDK-provided poses, but the SDK assumes poses supplied during frame submission are in start space. This transform matches the one reported in the most recent gvr_recenter_event_data. Type: gvr_mat4f |
GVR_PROPERTY_SAFETY_CYLINDER_ENTER_RADIUS
|
Distance from safety cylinder axis at which the user's state transitions from outside to inside, generating a GVR_EVENT_SAFETY_REGION_ENTER event. This value is guaranteed to be less than GVR_PROPERTY_SAFETY_CYLINDER_EXIT_RADIUS. Type: float |
GVR_PROPERTY_SAFETY_CYLINDER_EXIT_RADIUS
|
Distance from safety cylinder axis at which the user's state transitions from inside to outside, generating a GVR_EVENT_SAFETY_REGION_EXIT event. This value is guaranteed to be greater than GVR_PROPERTY_SAFETY_CYLINDER_ENTER_RADIUS. Type: float |
GVR_PROPERTY_SAFETY_REGION
|
The type of safety region, if any, currently employed by the headset's tracker. Type: int (gvr_safety_region_type) |
GVR_PROPERTY_TRACKING_FLOOR_HEIGHT
|
The height of the floor, if available, relative to the current start space origin. In general, for tracking systems with an eye level origin, this value will be negative. Type: float |
GVR_PROPERTY_TRACKING_STATUS
|
The current status of the head tracker, if available. Type: gvr_flags |
gvr_recenter_event_type
gvr_recenter_event_type
The type of a recentering associated with a GVR_EVENT_RECENTER event.
Properties | |
---|---|
GVR_RECENTER_EVENT_ALIGNED
|
A recenter event triggered by the controller (e.g. long-press on Home button or connecting controller as part of donning UX). |
GVR_RECENTER_EVENT_DON
|
A recenter event triggered by proximity sensor detecting the user has put put the headset on (a.k.a. donned the headset). |
GVR_RECENTER_EVENT_RESTART
|
Recentering state received from the platform upon starting or resuming the application. This event is usually precedes a GVR_EVENT_HEAD_TRACKING_RESUMED event in the same frame. |
gvr_reprojection
gvr_reprojection
Types of asynchronous reprojection.
Properties | |
---|---|
GVR_REPROJECTION_FULL
|
Reproject in all dimensions. |
GVR_REPROJECTION_NONE
|
Do not reproject. |
gvr_runtime_feature
gvr_runtime_feature
Types of Daydream features that the user may enable or disable at runtime.
These feature constants can be used with gvr_is_feature_supported() and gvr_user_prefs_is_feature_enabled()
See #com.google.vr.ndk.base.UserPrefs.RuntimeFeature for more information.
gvr_safety_region_type
gvr_safety_region_type
Safety region types exposed from the GVR_PROPERTY_SAFETY_REGION property.
Properties | |
---|---|
GVR_SAFETY_REGION_CYLINDER
|
A safety region defined by a vertically-oriented cylinder, extending infinitely along the Y axis, and centered at the start space origin. Extents can be queried with the GVR_PROPERTY_SAFETY_CYLINDER_INNER_RADIUS and GVR_PROPERTY_SAFETY_CYLINDER_OUTER_RADIUS property keys. |
gvr_viewer_type
gvr_viewer_type
The type of VR viewer.
Properties | |
---|---|
GVR_VIEWER_TYPE_CARDBOARD
|
A Cardboard-compatible viewer. A typical Cardboard viewer supports a simple touchscreen-based trigger input mechanism. On most platforms, this is the default viewer type if no viewer has been explicitly paired. |
GVR_VIEWER_TYPE_DAYDREAM
|
A Daydream-compatible viewer. A typical Daydream viewer supports 3DoF controller input (as defined in gvr_controller.h), and is intended only for Daydream-ready platforms. It does not support touchscreen-based input unless Cardboard emulation is explicitly enabled. |
Typedefs
gvr_audio_source_id
int32_t gvr_audio_source_id
Sound object and sound field identifier.
gvr_context
struct gvr_context_ gvr_context
Primary context for invoking Google VR APIs.
gvr_user_prefs
struct gvr_user_prefs_ gvr_user_prefs