GXInitSpecularDirHAv

C Specification

#include <revolution/gx.h>
#define GXInitSpecularDirHAv(lo,vecn,vech) \
(GXInitSpecularDirHA((lo), \
*(f32*)(vecn), *((f32*)(vecn)+1), *((f32*)(vecn)+2), \
*(f32*)(vech), *((f32*)(vech)+1), *((f32*)(vech)+2)))

Arguments

lo Pointer to a light object.
vecn Direction vector.
You may use an array of f32 type or structure.
vech User-specified half-angle vector.
You may use an array of f32 type or structure.

Return Values

None.

Description

This macro function sets the direction and half-angle vector of a specular light in the light object using a vector. 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 GXLoadLightObjImm or GXLoadLightObjIndx.

In contrast to GXInitSpecularDirv 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.

Note: The half-angle vector refers to the vector that specifies the angles that divide the direction of the lit object to the line of sight and the direction to the light into two equal parts.

Other notes are similar to those described in the GXInitSpecularDirv man page.

See Also

GXInitSpecularDirHA

GXLightObj Initialization Flow

Revision History

03/01/2006 Initial version.