This site has been archived and remains strictly as a historical reference for developers who actively maintain apps built using the legacy Google VR SDK, which was last updated in 2019 and is no longer receiving updates.
  • All developers actively developing experiences for Google Cardboard should use the new open source Cardboard SDKs for iOS, Android NDK, and Unity XR Plugin. These new SDKs offer streamlined APIs, improved device compatibility, and built-in viewer profile QR code scanning.
  • The Daydream View VR headset is no longer available for purchase as of October 15, 2019. Existing apps on supported devices are unaffected for users who previously installed those applications. It is no longer possible to opt-in to Daydream distribution via Google Play.

gvr::BufferViewport

#include <gvr.h>

Convenience C++ wrapper for the opaque gvr_buffer_viewport type.

Summary

The constructor allocates memory, so when used in tight loops, instances should be reused.

Inheritance

Inherits from: gvr::WrapperBase< gvr_buffer_viewport, gvr_buffer_viewport_destroy >

Public functions

GetExternalSurfaceId() const
int32_t
GetOpacity() const
float
For more information, see gvr_buffer_viewport_get_opacity().
GetReprojection() const
For more information, see gvr_buffer_viewport_get_reprojection().
GetSourceBufferIndex() const
int32_t
GetSourceFov() const
For more information, see gvr_buffer_viewport_get_source_fov().
GetSourceUv() const
For more information, see gvr_buffer_viewport_get_source_uv().
GetTargetEye() const
Eye
For more information, see gvr_buffer_viewport_get_target_eye().
GetTransform() const
For more information, see gvr_buffer_viewport_get_transform().
SetExternalSurfaceId(const int32_t external_surface_id)
void
SetOpacity(float opacity)
void
For more information, see gvr_buffer_viewport_set_opacity().
SetReprojection(gvr_reprojection reprojection)
void
For more information, see gvr_buffer_viewport_set_reprojection().
SetSourceBufferIndex(int32_t buffer_index)
void
SetSourceFov(const Rectf & fov)
void
For more information, see gvr_buffer_viewport_set_source_fov().
SetSourceLayer(int32_t layer_index)
void
For more information, see gvr_buffer_viewport_set_source_layer().
SetSourceUv(const Rectf & uv)
void
For more information, see gvr_buffer_viewport_set_source_uv().
SetTargetEye(Eye eye)
void
For more information, see gvr_buffer_viewport_set_target_eye().
SetTransform(const Mat4f & transform)
void
For more information, see gvr_buffer_viewport_set_transform().
operator!=(const BufferViewport & other) const
bool
operator==(const BufferViewport & other) const
bool
For more information, see gvr_buffer_viewport_equal().

Public functions

GetExternalSurfaceId

int32_t GetExternalSurfaceId() const 

GetOpacity

float GetOpacity() const 

For more information, see gvr_buffer_viewport_get_opacity().

GetReprojection

gvr_reprojection GetReprojection() const 

For more information, see gvr_buffer_viewport_get_reprojection().

GetSourceBufferIndex

int32_t GetSourceBufferIndex() const 

GetSourceFov

Rectf GetSourceFov() const 

For more information, see gvr_buffer_viewport_get_source_fov().

GetSourceUv

Rectf GetSourceUv() const 

For more information, see gvr_buffer_viewport_get_source_uv().

GetTargetEye

Eye GetTargetEye() const 

For more information, see gvr_buffer_viewport_get_target_eye().

GetTransform

Mat4f GetTransform() const 

For more information, see gvr_buffer_viewport_get_transform().

SetExternalSurfaceId

void SetExternalSurfaceId(
  const int32_t external_surface_id
)

SetOpacity

void SetOpacity(
  float opacity
)

For more information, see gvr_buffer_viewport_set_opacity().

SetReprojection

void SetReprojection(
  gvr_reprojection reprojection
)

For more information, see gvr_buffer_viewport_set_reprojection().

SetSourceBufferIndex

void SetSourceBufferIndex(
  int32_t buffer_index
)

SetSourceFov

void SetSourceFov(
  const Rectf & fov
)

For more information, see gvr_buffer_viewport_set_source_fov().

SetSourceLayer

void SetSourceLayer(
  int32_t layer_index
)

For more information, see gvr_buffer_viewport_set_source_layer().

SetSourceUv

void SetSourceUv(
  const Rectf & uv
)

For more information, see gvr_buffer_viewport_set_source_uv().

SetTargetEye

void SetTargetEye(
  Eye eye
)

For more information, see gvr_buffer_viewport_set_target_eye().

SetTransform

void SetTransform(
  const Mat4f & transform
)

For more information, see gvr_buffer_viewport_set_transform().

operator!=

bool operator!=(
  const BufferViewport & other
) const 

operator==

bool operator==(
  const BufferViewport & other
) const 

For more information, see gvr_buffer_viewport_equal().