Google VR Types

Various types used in the Google VR NDK.

Summary

Enumerations

@0{
  GVR_CONTROLLER_ENABLE_ORIENTATION = 1 << 0,
  GVR_CONTROLLER_ENABLE_TOUCH = 1 << 1,
  GVR_CONTROLLER_ENABLE_GYRO = 1 << 2,
  GVR_CONTROLLER_ENABLE_ACCEL = 1 << 3,
  GVR_CONTROLLER_ENABLE_GESTURES = 1 << 4,
  GVR_CONTROLLER_ENABLE_POSE_PREDICTION = 1 << 5,
  GVR_CONTROLLER_ENABLE_POSITION = 1 << 6,
  GVR_CONTROLLER_ENABLE_BATTERY = 1 << 7,
  GVR_CONTROLLER_ENABLE_ARM_MODEL = 1 << 8
}
enum
Controller API options (bit flags).
@1{
  GVR_EXTERNAL_SURFACE_ID_NONE = -1,
  GVR_BUFFER_INDEX_EXTERNAL_SURFACE = -1,
  GVR_AUDIO_INVALID_SOURCE_ID = -1
}
enum
gvr_arm_model_behavior enum
Types of gaze behaviors used for arm model.
gvr_audio_distance_rolloff_type{
  GVR_AUDIO_ROLLOFF_LOGARITHMIC = 0,
  GVR_AUDIO_ROLLOFF_LINEAR = 1,
  GVR_AUDIO_ROLLOFF_NONE = 2
}
enum
Distance rolloff models used for distance attenuation.
gvr_audio_material_type{
  GVR_AUDIO_MATERIAL_TRANSPARENT = 0,
  GVR_AUDIO_MATERIAL_ACOUSTIC_CEILING_TILES = 1,
  GVR_AUDIO_MATERIAL_BRICK_BARE = 2,
  GVR_AUDIO_MATERIAL_BRICK_PAINTED = 3,
  GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_COARSE = 4,
  GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_PAINTED = 5,
  GVR_AUDIO_MATERIAL_CURTAIN_HEAVY = 6,
  GVR_AUDIO_MATERIAL_FIBER_GLASS_INSULATION = 7,
  GVR_AUDIO_MATERIAL_GLASS_THIN = 8,
  GVR_AUDIO_MATERIAL_GLASS_THICK = 9,
  GVR_AUDIO_MATERIAL_GRASS = 10,
  GVR_AUDIO_MATERIAL_LINOLEUM_ON_CONCRETE = 11,
  GVR_AUDIO_MATERIAL_MARBLE = 12,
  GVR_AUDIO_MATERIAL_METAL = 13,
  GVR_AUDIO_MATERIAL_PARQUET_ON_CONCRETE = 14,
  GVR_AUDIO_MATERIAL_PLASTER_ROUGH = 15,
  GVR_AUDIO_MATERIAL_PLASTER_SMOOTH = 16,
  GVR_AUDIO_MATERIAL_PLYWOOD_PANEL = 17,
  GVR_AUDIO_MATERIAL_POLISHED_CONCRETE_OR_TILE = 18,
  GVR_AUDIO_MATERIAL_SHEET_ROCK = 19,
  GVR_AUDIO_MATERIAL_WATER_OR_ICE_SURFACE = 20,
  GVR_AUDIO_MATERIAL_WOOD_CEILING = 21,
  GVR_AUDIO_MATERIAL_WOOD_PANEL = 22
}
enum
Room surface material names, used to set room properties.
gvr_audio_rendering_mode{
  GVR_AUDIO_RENDERING_STEREO_PANNING = 0,
  GVR_AUDIO_RENDERING_BINAURAL_LOW_QUALITY = 1,
  GVR_AUDIO_RENDERING_BINAURAL_HIGH_QUALITY = 2
}
enum
Rendering modes define CPU load / rendering quality balances.
gvr_audio_surround_format_type enum
Supported surround sound formats.
gvr_color_format_type{
  GVR_COLOR_FORMAT_RGBA_8888 = 0,
  GVR_COLOR_FORMAT_RGB_565 = 1
}
enum
Valid color formats for swap chain buffers.
gvr_controller_api_status{
  GVR_CONTROLLER_API_OK = 0,
  GVR_CONTROLLER_API_UNSUPPORTED = 1,
  GVR_CONTROLLER_API_NOT_AUTHORIZED = 2,
  GVR_CONTROLLER_API_UNAVAILABLE = 3,
  GVR_CONTROLLER_API_SERVICE_OBSOLETE = 4,
  GVR_CONTROLLER_API_CLIENT_OBSOLETE = 5,
  GVR_CONTROLLER_API_MALFUNCTION = 6
}
enum
Constants that represent the status of the controller API.
gvr_controller_battery_level{
  GVR_CONTROLLER_BATTERY_LEVEL_COUNT = 6
}
enum
Controller battery states.
gvr_controller_button{
  GVR_CONTROLLER_BUTTON_CLICK = 1,
  GVR_CONTROLLER_BUTTON_COUNT = 6
}
enum
Controller buttons.
gvr_controller_connection_state{
  GVR_CONTROLLER_DISCONNECTED = 0,
  GVR_CONTROLLER_SCANNING = 1,
  GVR_CONTROLLER_CONNECTING = 2,
  GVR_CONTROLLER_CONNECTED = 3
}
enum
Constants that represent the state of the controller.
gvr_controller_handedness enum
gvr_depth_stencil_format_type{
  GVR_DEPTH_STENCIL_FORMAT_NONE = 255,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_16 = 0,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_24 = 1,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_24_STENCIL_8 = 2,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F = 3,
  GVR_DEPTH_STENCIL_FORMAT_DEPTH_32_F_STENCIL_8 = 4,
  GVR_DEPTH_STENCIL_FORMAT_STENCIL_8 = 5
}
enum
gvr_error{
  GVR_ERROR_NO_EVENT_AVAILABLE = 1000000,
  GVR_ERROR_NO_PROPERTY_AVAILABLE = 1000001
}
enum
Constants that represent GVR error codes.
gvr_event_type{
  GVR_EVENT_RECENTER = 1,
  GVR_EVENT_SAFETY_REGION_EXIT = 2,
  GVR_EVENT_SAFETY_REGION_ENTER = 3
}
enum
The type of gvr_event.
gvr_eye enum
An enum for the left and right eye.
gvr_feature{
  GVR_FEATURE_ASYNC_REPROJECTION = 0,
  GVR_FEATURE_MULTIVIEW = 1,
  GVR_FEATURE_EXTERNAL_SURFACE = 2,
  GVR_FEATURE_HEAD_POSE_6DOF = 3
}
enum
Types of VR-specific features which may or may not be supported on the underlying platform.
gvr_property_type{
  GVR_PROPERTY_TRACKING_FLOOR_HEIGHT = 1,
  GVR_PROPERTY_RECENTER_TRANSFORM = 2,
  GVR_PROPERTY_SAFETY_REGION = 3,
  GVR_PROPERTY_SAFETY_CYLINDER_INNER_RADIUS = 4,
  GVR_PROPERTY_SAFETY_CYLINDER_OUTER_RADIUS = 5
}
enum
Property types exposed by the gvr_properties_get() API.
gvr_recenter_event_type{
  GVR_RECENTER_EVENT_RESTART = 1,
  GVR_RECENTER_EVENT_ALIGNED = 2
}
enum
The type of a recentering associated with a GVR_EVENT_RECENTER event.
gvr_reprojection{
  GVR_REPROJECTION_NONE = 0,
  GVR_REPROJECTION_FULL = 1
}
enum
Types of asynchronous reprojection.
gvr_safety_region_type enum
gvr_value_type enum
Value types for the contents of a gvr_value object instance.
gvr_viewer_type{
  GVR_VIEWER_TYPE_CARDBOARD = 0,
  GVR_VIEWER_TYPE_DAYDREAM = 1
}
enum
The type of VR viewer.

Typedefs

gvr_audio_source_id typedef
int32_t
Sound object and sound field identifier.
gvr_context typedef
struct gvr_context_
Primary context for invoking Google VR APIs.
gvr_user_prefs typedef
struct gvr_user_prefs_

Enumerations

@0

 @0

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.

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 controller position data should be reported.

GVR_CONTROLLER_ENABLE_TOUCH

Indicates that controller touchpad data should be reported.

@1

 @1
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.

Properties
GVR_AUDIO_MATERIAL_ACOUSTIC_CEILING_TILES

Acoustic ceiling tiles, absorbs most frequencies.

GVR_AUDIO_MATERIAL_BRICK_BARE

Bare brick, relatively reflective.

GVR_AUDIO_MATERIAL_BRICK_PAINTED

Painted brick.

GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_COARSE

Coarse surface concrete block.

GVR_AUDIO_MATERIAL_CONCRETE_BLOCK_PAINTED

Painted concrete block.

GVR_AUDIO_MATERIAL_CURTAIN_HEAVY

Heavy curtains.

GVR_AUDIO_MATERIAL_FIBER_GLASS_INSULATION

Fiber glass insulation.

GVR_AUDIO_MATERIAL_GLASS_THICK

Thick glass.

GVR_AUDIO_MATERIAL_GLASS_THIN

Thin glass.

GVR_AUDIO_MATERIAL_GRASS

Grass.

GVR_AUDIO_MATERIAL_LINOLEUM_ON_CONCRETE

Linoleum on concrete.

GVR_AUDIO_MATERIAL_MARBLE

Marble.

GVR_AUDIO_MATERIAL_METAL

Galvanized sheet metal.

GVR_AUDIO_MATERIAL_PARQUET_ON_CONCRETE

Wooden parquet on concrete.

GVR_AUDIO_MATERIAL_PLASTER_ROUGH

Rough plaster surface.

GVR_AUDIO_MATERIAL_PLASTER_SMOOTH

Smooth plaster surface.

GVR_AUDIO_MATERIAL_PLYWOOD_PANEL

Plywood panel.

GVR_AUDIO_MATERIAL_POLISHED_CONCRETE_OR_TILE

Polished concrete OR tile surface.

GVR_AUDIO_MATERIAL_SHEET_ROCK

Sheet rock.

GVR_AUDIO_MATERIAL_TRANSPARENT

Acoustically transparent material, reflects no sound.

GVR_AUDIO_MATERIAL_WATER_OR_ICE_SURFACE

Surface of water or ice.

GVR_AUDIO_MATERIAL_WOOD_CEILING

Wooden ceiling.

GVR_AUDIO_MATERIAL_WOOD_PANEL

Wood paneling.

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.

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 5 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_RECENTER

Notification that a global recentering event has occurred.

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_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 "sensor" space to the recentered "start" space.

Apps can optionally undo or extend this transform to perform custom recentering logic with the returned pose, but all poses supplied during frame submission are assumed to be in start space. Type: gvr_mat4f

GVR_PROPERTY_SAFETY_CYLINDER_INNER_RADIUS

Inner radius for the safety cylinder region, outside of which a safety fog effect will begin to be applied.

Type: float

GVR_PROPERTY_SAFETY_CYLINDER_OUTER_RADIUS

Outer radius for the safety cylinder region, outside of which a safety fog effect is fully applied.

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_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.

GVR_RECENTER_EVENT_RESTART

A recenter event triggered by headset removal and re-attachment.

gvr_reprojection

 gvr_reprojection

Types of asynchronous reprojection.

Properties
GVR_REPROJECTION_FULL

Reproject in all dimensions.

GVR_REPROJECTION_NONE

Do not reproject.

gvr_safety_region_type

 gvr_safety_region_type

gvr_value_type

 gvr_value_type

Value types for the contents of a gvr_value object instance.

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