SetPosition

nn::gd::CTR::Light::SetPosition Member Function

Syntax

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

Parameters

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. It sets the light position. You must use SetLightType to set the light type to SOURCE_TYPE_POINT. This function is an immediate function. (Immediate functions directly generate commands and insert them into the command buffer.)
Note: This function sets the same registers as the Light::SetDirection function.

The format of the data inserted into the command buffer is:
0x00000000 (Y << 16) | X
0x00000004 [Reserved]
0x00000008 Z
0x0000000c [Reserved]


X, Y, and Z are each 16-bit floating point values. This function converts from a 32-bit floating point format to a 16-bit floating point format.

The default value is all 0.0f.

See Also

Utils::Float32ToFloat16
SetDirection

Revision History

2011/07/13
Added the default value.
2011/02/17
Initial version.

CONFIDENTIAL