nn::gd::CTR::Light::SetDirection Member Function

Syntax

void SetDirection(
     f32 X,
     f32 Y,
     f32 Z
);

Arguments

Name Description
in X Sets the x-coordinate of the light source.
in Y Sets the y-coordinate of the light source.
in Z Sets the z-coordinate of the light source.

Return Values

None.

Description

This is an immediate function. Sets the light direction. SOURCE_TYPE_DIRECTIONAL must be specified for the light type to be set using SetLightType. (The resulting command from the immediate function is inserted into the command buffer.)
Note: This function sets the same registers as the Light::SetDirection function.

The format of commands that can be put in the command buffer:
0x00000000 (Y << 16) | X
0x00000004 [Reserved]
0x00000008 Z
0x0000000c [Reserved]
X, Y, and Z each have 16-bit floating point values. This function converts from a 32-bit floating point format to a 16-bit floating point format.

See Also

Utils::Float32ToFloat16
SetPosition

Revision History

2011/02/17
Initial version.

CONFIDENTIAL