G3_LightVector

# G3*_LightVector

## C Specification

      #include <nitro/gx/g3imm.h>
      #include <nitro/gx/g3b.h>
      #include <nitro/gx/g3c.h>

      void G3_LightVector(GXLightId lightID, fx16 x, fx16 y, fx16 z);

      // Below are APIs for creating the display list (command list)
      void G3B_LightVector(GXDLInfo* info, GXLightId lightID, fx16 x, fx16 y, fx16 z);
      void G3C_LightVector(GXDLInfo* info, GXLightId lightID, fx16 x, fx16 y, fx16 z);
      void G3BS_LightVector(GXDLInfo* info, GXLightId lightID, fx16 x, fx16 y, fx16 z);
      void G3CS_LightVector(GXDLInfo* info, GXLightId lightID, fx16 x, fx16 y, fx16 z);

## Description

This function sets the direction vector for light.

`lightID` selects one of 4 lights, and `x`, `y`, and `z` set the light vector. The arguments can take values of more than -`FX16_ONE` and less than `FX16_ONE` - 1. Because the format is changed internally to fixed point decimal (sign + 9-bit decimal), the value is passed to the hardware as more than -1.0 (`0xF000`) and less than 0.998 (`0x0FF9`). Set a unit vector because the hardware does not normalize vectors.

After the settings, coordinate conversion occurs with the directional vector matrix. See `G3*_LightColor` for details on `GXLightId` types.

Note: Immediately after the settings, coordinate conversion occurs internally according to the current directional vector matrix. In other words, this function is called for both cases when the light direction changes and when the camera direction changes.

## Arguments

`info` | Command list information
`lightID` | Light number (0 - 3)
`x` | x-component of the light directional vector
`y` | y-component of the light directional vector
`z` | z-component of the light directional vector

## Return Values

None

## See Also

`G3*_LightColor`

## Revision History

02/09/2004 Added to the description
01/19/2004 Initial Version