GXInitSpecularDirHA

Syntax

#include <revolution/gx.h>

void GXInitSpecularDirHA(
    GXLightObj* lt_obj,
    f32         nx,
    f32         ny,
    f32         nz,
    f32         hx,
    f32         hy,
    f32         hz );

Arguments

lt_obj Pointer to a light object.
nx X component of the light direction.
ny Y component of the light direction.
nz Z component of light direction.
hx X component of the user-specified half-angle vector.
hy Y component of the user-specified half-angle vector.
hz Z component of the user-specified half-angle vector.

Return Values

None.

Description

This function sets the direction and half-angle vector of a specular light in the light object. These vectors are used when the light object is used only as specular light. The memory for the light object must be allocated by the application; this function does not load any hardware registers. To load a light object into a hardware light, use the GXLoadLightObjImm or GXLoadLightObjIndx function.

In contrast to the GXInitSpecularDir function, which calculates half-angle vector automatically by assuming the view vector as (0, 0, 1), this function allows users to specify half-angle vector directly as input arguments. It's useful for detailed control for orientation of highlights. The half-angle vector is required to be normalized.

(The half-angle vector refers to the vector that specifies the angle lying halfway between the vector from the object to the eye and the vector from the object to the light.))

Other notes to be aware of are similar to those described in the GXInitSpecularDir function's reference page.

See Also

GXInitSpecularDir, GXLoadLightObjImm, GXLoadLightObjIndx, GXSetChanCtrl, GXLightObj Initialization Flow

Revision History

2006/03/01 Initial version.


CONFIDENTIAL