Skip to content

Latest commit

 

History

History
134 lines (82 loc) · 2.57 KB

d3d10-d3dxmatrixortholh.md

File metadata and controls

134 lines (82 loc) · 2.57 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location
D3DXMatrixOrthoLH function (D3DX10Math.h) - Builds a left-handed orthographic projection matrix.
67bec4a3-2126-4f5a-9301-97faa6dc6e84
D3DXMatrixOrthoLH function (D3DX10Math.h)
reference
05/31/2018
APIRef
kbSyntax
D3DXMatrixOrthoLH
LibDef
D3DX10.lib
D3DX10.dll

D3DXMatrixOrthoLH function (D3DX10Math.h)

Note

The D3DX10 utility library is deprecated. We recommend that you use DirectXMath instead.

Builds a left-handed orthographic projection matrix.

Syntax

D3DXMATRIX* D3DXMatrixOrthoLH(
  _Inout_ D3DXMATRIX *pOut,
  _In_    FLOAT      w,
  _In_    FLOAT      h,
  _In_    FLOAT      zn,
  _In_    FLOAT      zf
);

Parameters

pOut [in, out]

Type: D3DXMATRIX*

Pointer to the resulting D3DXMATRIX.

w [in]

Type: FLOAT

Width of the view volume.

h [in]

Type: FLOAT

Height of the view volume.

zn [in]

Type: FLOAT

Minimum z-value of the view volume which is referred to as z-near.

zf [in]

Type: FLOAT

Maximum z-value of the view volume which is referred to as z-far.

Return value

Type: D3DXMATRIX*

Pointer to the resulting D3DXMATRIX.

Remarks

All the parameters of the D3DXMatrixOrthoLH function are distances in camera space. The parameters describe the dimensions of the view volume.

The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXMatrixOrthoLH function can be used as a parameter for another function.

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

2/w  0    0           0
0    2/h  0           0
0    0    1/(zf-zn)   0
0    0    zn/(zn-zf)  1

Requirements

Requirement Value
Header
D3DX10Math.h
Library
D3DX10.lib

See also

Math Functions