Matrix.PerspectiveFovRH Method
Builds a right-handed perspective projection matrix based on a field of view (FOV).
Namespace: Microsoft.WindowsMobile.DirectX
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Shared Function PerspectiveFovRH ( _
fieldOfViewY As Single, _
aspectRatio As Single, _
znearPlane As Single, _
zfarPlane As Single _
) As Matrix
'Usage
Dim fieldOfViewY As Single
Dim aspectRatio As Single
Dim znearPlane As Single
Dim zfarPlane As Single
Dim returnValue As Matrix
returnValue = Matrix.PerspectiveFovRH(fieldOfViewY, _
aspectRatio, znearPlane, zfarPlane)
public static Matrix PerspectiveFovRH(
float fieldOfViewY,
float aspectRatio,
float znearPlane,
float zfarPlane
)
public:
static Matrix PerspectiveFovRH(
float fieldOfViewY,
float aspectRatio,
float znearPlane,
float zfarPlane
)
public static function PerspectiveFovRH(
fieldOfViewY : float,
aspectRatio : float,
znearPlane : float,
zfarPlane : float
) : Matrix
Parameters
fieldOfViewY
Type: System.SingleField of view in the y direction, in radians.
aspectRatio
Type: System.SingleAspect ratio, defined as the view space width divided by height.
znearPlane
Type: System.SingleZ-value of the near view plane.
zfarPlane
Type: System.SingleZ-value of the far view plane.
Return Value
Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix structure that is a right-handed perspective projection matrix.
Remarks
This method uses the following formula to compute the returned matrix. The view space height is represented by h. It is calculated from h = cot(fieldOfViewY/2). The view space width is represented by w. It is calculated from h = w / aspectRatio.
w 0 0 0
0 h 0 0
0 0 zfarPlane/(znearPlane-zfarPlane) -1
0 0 znearPlane*zfarPlane/(znearPlane-zfarPlane) 0
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0