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