示例#1
0
        public bool TryGetProjectionMatrix(float nearClipPlane, float farClipPlane, out Matrix4x4 projectionMatrix)
        {
            bool result;

            if (this.hasLocationData)
            {
                float num = 0.01f;
                if (nearClipPlane < num)
                {
                    nearClipPlane = num;
                }
                if (farClipPlane < nearClipPlane + num)
                {
                    farClipPlane = nearClipPlane + num;
                }
                projectionMatrix = PhotoCaptureFrame.GetProjection(this.m_NativePtr);
                float num2 = 1f / (farClipPlane - nearClipPlane);
                float m    = -(farClipPlane + nearClipPlane) * num2;
                float m2   = -(2f * farClipPlane * nearClipPlane) * num2;
                projectionMatrix.m22 = m;
                projectionMatrix.m23 = m2;
                result = true;
            }
            else
            {
                projectionMatrix = Matrix4x4.identity;
                result           = false;
            }
            return(result);
        }
示例#2
0
        public bool TryGetProjectionMatrix(out Matrix4x4 projectionMatrix)
        {
            bool result;

            if (this.hasLocationData)
            {
                projectionMatrix = PhotoCaptureFrame.GetProjection(this.m_NativePtr);
                result           = true;
            }
            else
            {
                projectionMatrix = Matrix4x4.identity;
                result           = false;
            }
            return(result);
        }