Compartilhar via


Matrix.PerspectiveFovRH Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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
)
static member PerspectiveFovRH : 
        fieldOfViewY:float32 * 
        aspectRatio:float32 * 
        znearPlane:float32 * 
        zfarPlane:float32 -> Matrix 

Parameters

  • fieldOfViewY
    Type: System.Single
    Field of view in the y direction, in radians.
  • aspectRatio
    Type: System.Single
    Aspect ratio, defined as the view space width divided by height.

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

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

See Also

Reference

Matrix Structure

Matrix Members

Microsoft.WindowsMobile.DirectX Namespace