SetSpotDirection

nn::gd::CTR::Light::SetSpotDirection Member Function

Syntax

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

Parameters

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

Return Values

None.

Description

Sets the spotlight light direction. 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.)

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


The X,Y, and Z components are signed 13-bit fixed point values with an 11-bit fractional portion. This function converts from 32-bit to a signed 13-bit fixed point value with an 11-bit fractional portion format.

The default value is all 0.0f.

See Also

Utils::Float32ToFix13Fraction11

Revision History

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

CONFIDENTIAL