nn::gd::CTR::Light::SetPosition Member Function
void SetPosition(
f32 X,
f32 Y,
f32 Z
);
| 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. |
This is an immediate function. It sets the light direction. SOURCE_TYPE_PUNCTUAL must be specified for a light type 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.
CONFIDENTIAL