public Rect GetViewport(GvrViewer.Eye eye, GvrViewer.Distortion distortion = GvrViewer.Distortion.Distorted) { switch (eye) { case GvrViewer.Eye.Left: return(distortion == GvrViewer.Distortion.Distorted ? leftEyeDistortedViewport : leftEyeUndistortedViewport); case GvrViewer.Eye.Right: return(distortion == GvrViewer.Distortion.Distorted ? rightEyeDistortedViewport : rightEyeUndistortedViewport); default: return(new Rect()); } }
public Matrix4x4 GetProjection(GvrViewer.Eye eye, GvrViewer.Distortion distortion = GvrViewer.Distortion.Distorted) { switch (eye) { case GvrViewer.Eye.Left: return(distortion == GvrViewer.Distortion.Distorted ? leftEyeDistortedProjection : leftEyeUndistortedProjection); case GvrViewer.Eye.Right: return(distortion == GvrViewer.Distortion.Distorted ? rightEyeDistortedProjection : rightEyeUndistortedProjection); default: return(Matrix4x4.identity); } }