522 {
523 if (nearPlaneDistance <= 0f)
524 {
525 throw new ArgumentOutOfRangeException("nearPlaneDistance");
526 }
527 if (farPlaneDistance <= 0f)
528 {
529 throw new ArgumentOutOfRangeException("farPlaneDistance");
530 }
531 if (nearPlaneDistance >= farPlaneDistance)
532 {
533 throw new ArgumentOutOfRangeException("nearPlaneDistance");
534 }
536 result.M11 = 2f * nearPlaneDistance / width;
537 result.M12 = (result.M13 = (result.M14 = 0f));
538 result.M22 = 2f * nearPlaneDistance / height;
539 result.M21 = (result.M23 = (result.M24 = 0f));
540 float num = (result.M33 = (float.IsPositiveInfinity(farPlaneDistance) ? (-1f) : (farPlaneDistance / (nearPlaneDistance - farPlaneDistance))));
541 result.M31 = (result.M32 = 0f);
542 result.M34 = -1f;
543 result.M41 = (result.M42 = (result.M44 = 0f));
544 result.M43 = nearPlaneDistance * num;
545 return result;
546 }
Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)