Share via


Matrix.OrthoOffCenterLH Method

Builds a customized, left-handed orthogonal projection matrix.

Namespace:  Microsoft.WindowsMobile.DirectX
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Shared Function OrthoOffCenterLH ( _
    left As Single, _
    right As Single, _
    bottom As Single, _
    top As Single, _
    znearPlane As Single, _
    zfarPlane As Single _
) As Matrix
'Usage
Dim left As Single 
Dim right As Single 
Dim bottom As Single 
Dim top As Single 
Dim znearPlane As Single 
Dim zfarPlane As Single 
Dim returnValue As Matrix 

returnValue = Matrix.OrthoOffCenterLH(left, _
    right, bottom, top, znearPlane, zfarPlane)
public static Matrix OrthoOffCenterLH(
    float left,
    float right,
    float bottom,
    float top,
    float znearPlane,
    float zfarPlane
)
public:
static Matrix OrthoOffCenterLH(
    float left, 
    float right, 
    float bottom, 
    float top, 
    float znearPlane, 
    float zfarPlane
)
public static function OrthoOffCenterLH(
    left : float, 
    right : float, 
    bottom : float, 
    top : float, 
    znearPlane : float, 
    zfarPlane : float
) : Matrix

Parameters

  • znearPlane
    Type: System.Single

    Minimum z-value of the view volume.

  • zfarPlane
    Type: System.Single

    Maximum z-value of the view volume.

Return Value

Type: Microsoft.WindowsMobile.DirectX.Matrix
A Matrix structure that is a customized, left-handed orthogonal projection matrix.

Remarks

An orthogonal matrix is an invertible matrix for which the inverse is equal to the transpose.

The OrthoLH method is a special case of the OrthoOffCenterLH method. To create the same projection using OrthoOffCenterLH, use the following values: left = –width/2, right = width/2, bottom = –height/2, and top = height/2.

All of the parameters of the OrthoOffCenterLH method are distances in camera space. The parameters describe the dimensions of the view volume.

This method uses the following formula to compute the returned matrix.

2/(right-l)           0                         0                                  0
0                     2/(top-bottom)            0                                  0
0                     0                         1/(zfarPlane-znearPlane)           0
(l+right)/(l-right)  (top+bottom)/(bottom-top)  znearPlane/(znearPlane-zfarPlane)  1

.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