Matrix4x4.CreatePerspective(Single, Single, Single, Single) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从给定的视图卷维度创建透视投影矩阵。
public:
static System::Numerics::Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance);
public static System.Numerics.Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance);
static member CreatePerspective : single * single * single * single -> System.Numerics.Matrix4x4
Public Shared Function CreatePerspective (width As Single, height As Single, nearPlaneDistance As Single, farPlaneDistance As Single) As Matrix4x4
参数
- width
- Single
接近视图平面的视图卷的宽度。
- height
- Single
接近视图平面的视图卷的高度。
- nearPlaneDistance
- Single
接近视图平面的距离。
- farPlaneDistance
- Single
远视图平面的距离。
返回
透视投影矩阵。
例外
nearPlaneDistance 小于或等于零。
-或-
farPlaneDistance 小于或等于零。
-或-
nearPlaneDistance 大于或等于 farPlaneDistance。