XMMatrixLookToLH

Builds a view matrix for a left-handed coordinate system using a camera position, an up direction, and a camera direction.

Syntax

XMMATRIX XMMatrixLookToLH(
         XMVECTOR EyePosition,
         XMVECTOR EyeDirection,
         XMVECTOR UpDirection
)  

Parameters

EyePosition
Type: XMVECTOR 

Position of the camera.

EyeDirection
Type: XMVECTOR 

Direction of the camera.

UpDirection
Type: XMVECTOR 

Up direction of the camera, typically < 0.0f, 1.0f, 0.0f >.

Return value

Type: XMMATRIX 

Returns a view matrix that transforms a point from world space into view space.

Requirements

Header: Declared in directxmath.h.