XMMatrixOrthographicOffCenterRH

Builds a custom orthogonal projection matrix for a right-handed coordinate system.

Syntax

XMMATRIX XMMatrixOrthographicOffCenterRH(
         float ViewLeft,
         float ViewRight,
         float ViewBottom,
         float ViewTop,
         float NearZ,
         float FarZ
)  

Parameters

ViewLeft
Type: float 

Minimum x-value of the view volume.

ViewRight
Type: float 

Maximum x-value of the view volume.

ViewBottom
Type: float 

Minimum y-value of the view volume.

ViewTop
Type: float 

Maximum y-value of the view volume.

NearZ
Type: float 

Distance to the near clipping plane.

FarZ
Type: float 

Distance to the far clipping plane.

Return value

Type: XMMATRIX 

Returns the custom orthogonal projection matrix.

Remarks

All the parameters of XMMatrixOrthographicOffCenterRH are distances in camera space.

Requirements

Header: Declared in directxmath.h.