GVR Beta APIs
These are Beta APIs that are likely to change between releases.
Summary
This file contains Daydream Beta APIs. Beta APIs are not subject to the usual deprecation process. Beta APIs are expected to change and may be removed entirely in a future version without warning. Beta APIs might also use functionality that is not available to all users or on all devices.
Typedefs |
|
---|---|
gvr_beta_see_through_config
|
typedefstruct gvr_beta_see_through_config_
Configuration settings for see-through. |
Functions |
|
---|---|
gvr_beta_controller_get_configuration_type(const gvr_controller_context *controller_context, const gvr_controller_state *state)
|
int32_t
Returns the configuration of the given controller.
|
gvr_beta_controller_state_get_tracking_status(const gvr_controller_state *state)
|
int32_t
Returns the tracking status of the controller.
|
gvr_beta_see_through_config_create(gvr_context *gvr)
|
Creates a gvr_beta_see_through_config instance.
|
gvr_beta_see_through_config_destroy(gvr_beta_see_through_config **config)
|
void
Destroys a gvr_beta_see_through_config instance created by gvr_beta_see_through_config_create().
|
gvr_beta_see_through_config_set_camera_mode(gvr_beta_see_through_config *config, int32_t camera_mode)
|
void
Sets the camera mode for the given see-through config which determines the see-through's appearance.
|
gvr_beta_see_through_config_set_scene_type(gvr_beta_see_through_config *config, int32_t scene_type)
|
void
Sets the scene type on the given see-through config.
|
gvr_beta_set_see_through_config(gvr_context *context, const gvr_beta_see_through_config *config)
|
void
The main function for enabling/disabling and configuring see-through.
|
Enumerations
gvr_beta_controller_configuration_type
gvr_beta_controller_configuration_type
Configuration for a specific controller.
gvr_beta_controller_tracking_status_flags
gvr_beta_controller_tracking_status_flags
Tracking state for experimental 6DoF controllers.
gvr_beta_see_through_camera_mode
gvr_beta_see_through_camera_mode
The different supported appearances that determine how camera see-through frames will be drawn.
gvr_beta_see_through_scene_type
gvr_beta_see_through_scene_type
The different scene types that an app can have.
These control where the scene is rendered from. Generally a virtual scene the scene should be rendered from the users' eyes while an augmented scene should be rendered from the camera's position to match the see-through images. More details should be found at the eye offset doc.
Typedefs
gvr_beta_see_through_config
struct gvr_beta_see_through_config_ gvr_beta_see_through_config
Configuration settings for see-through.
Functions
gvr_beta_controller_get_configuration_type
int32_t gvr_beta_controller_get_configuration_type( const gvr_controller_context *controller_context, const gvr_controller_state *state )
Returns the configuration of the given controller.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
the current controller configuration of type gvr_beta_controller_configuration_type.
|
gvr_beta_controller_state_get_tracking_status
int32_t gvr_beta_controller_state_get_tracking_status( const gvr_controller_state *state )
Returns the tracking status of the controller.
The status is an OR'd combination of GVR_BETA_CONTROLLER_TRACKING_STATUS_FLAG_* flags.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The set of flags representing the current the tracking status.
|
gvr_beta_see_through_config_create
gvr_beta_see_through_config * gvr_beta_see_through_config_create( gvr_context *gvr )
Creates a gvr_beta_see_through_config instance.
It can then be set as the active config through gvr_beta_set_see_through_config().
gvr_beta_see_through_config_destroy
void gvr_beta_see_through_config_destroy( gvr_beta_see_through_config **config )
Destroys a gvr_beta_see_through_config instance created by gvr_beta_see_through_config_create().
gvr_beta_see_through_config_set_camera_mode
void gvr_beta_see_through_config_set_camera_mode( gvr_beta_see_through_config *config, int32_t camera_mode )
Sets the camera mode for the given see-through config which determines the see-through's appearance.
camera_mode should be a gvr_beta_see_through_camera_mode. This will control whether see-through is shown on screen and how it will be colored.
gvr_beta_see_through_config_set_scene_type
void gvr_beta_see_through_config_set_scene_type( gvr_beta_see_through_config *config, int32_t scene_type )
Sets the scene type on the given see-through config.
scene_type should be a gvr_beta_see_through_scene_type. This changes the behavior of gvr_get_eye_from_head_matrix() and gvr_get_head_space_from_start_space_transform() based on the scene type.
gvr_beta_set_see_through_config
void gvr_beta_set_see_through_config( gvr_context *context, const gvr_beta_see_through_config *config )
The main function for enabling/disabling and configuring see-through.
This function should only be called from the same thread as gvr_frame_submit.
This will both:
- Set the camera see-through appearance. If this appearance is anything other than GVR_BETA_SEE_THROUGH_CAMERA_MODE_DISABLED then a buffer viewport will be added for each eye whenever a frame is submitted. This will cause the camera frames to be drawn as a background layer, with the rendering style determined by the camera mode. Alpha blending will work as normal, so if the app's bottom layer has alpha 1 then the camera frame will be occluded but if the alpha is 0 the camera frame will show through.
- If the scene type is GVR_BETA_SEE_THROUGH_SCENE_TYPE_AUGMENTED_SCENE, it will change the behavior of gvr_get_head_space_from_start_space_transform to offset the input timestamp and gvr_get_eye_from_head_matrix to include the camera offset.
Details | |||
---|---|---|---|
Parameters |
|