November 6, 2019 update:
  • There's a new open source Cardboard SDK for iOS and Android NDK that offers a streamlined API, improved device compatibility, and built-in viewer profile QR code scanning. A corresponding Unity package (SDK) is planned for a future release. We recommend that all developers actively building for Google Cardboard migrate (iOS, Android NDK) to the new Cardboard SDK.
October 15, 2019 update:
  • The Daydream View VR headset is no longer available for purchase. However, you can continue to use the existing Google VR SDK to update and distribute your apps to the Google Play Store, and make them available to users in the Daydream app.

GVRHeadTransform Class

GVRHeadTransform Class Reference

Overview

Defines a class to represent the head transformation for a render frame.

Inherits NSObject.

Instance Method Summary

(CGRect) - viewportForEye:
 Returns the screen viewport for a given eye. More...
 
(GLKMatrix4) - projectionMatrixForEye:near:far:
 Returns the projection matrix for the specified eye. More...
 
(GLKMatrix4) - eyeFromHeadMatrix:
 Returns the transformation matrix used to convert from Head Space to Eye Space for the given eye. More...
 
(GLKMatrix4) - headPoseInStartSpace
 Returns the reference matrix of the head pose in start space. More...
 
(GVRFieldOfView- fieldOfViewForEye:
 Returns the field of view for the specified eye. More...
 

Method Detail

- (CGRect) viewportForEye: (GVREye)  eye

Returns the screen viewport for a given eye.

- (GLKMatrix4) projectionMatrixForEye: (GVREye)  eye
near: (CGFloat)  near
far: (CGFloat)  far 

Returns the projection matrix for the specified eye.

- (GLKMatrix4) eyeFromHeadMatrix: (GVREye)  eye

Returns the transformation matrix used to convert from Head Space to Eye Space for the given eye.

- (GLKMatrix4) headPoseInStartSpace

Returns the reference matrix of the head pose in start space.

- (GVRFieldOfView) fieldOfViewForEye: (GVREye)  eye

Returns the field of view for the specified eye.