Пример #1
0
        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());
            }
        }
Пример #2
0
        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);
            }
        }