|
Matrix4x4CreatePerspective Method
|
Creates a perspective projection matrix.
Namespace:
Accord.Math
Assembly:
Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax public static Matrix4x4 CreatePerspective(
float width,
float height,
float nearPlaneDistance,
float farPlaneDistance
)
Public Shared Function CreatePerspective (
width As Single,
height As Single,
nearPlaneDistance As Single,
farPlaneDistance As Single
) As Matrix4x4
Request Example
View SourceParameters
- width
- Type: SystemSingle
Width of the view volume at the near view plane. - height
- Type: SystemSingle
Height of the view volume at the near view plane. - nearPlaneDistance
- Type: SystemSingle
Distance to the near view plane. - farPlaneDistance
- Type: SystemSingle
Distance to the far view plane.
Return Value
Type:
Matrix4x4Return a perspective projection matrix.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | Both near and far view planes' distances must be greater than zero. |
ArgumentException | Near plane must be closer than the far plane. |
See Also