#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)))
| lo | Pointer to a light object. |
|---|---|
| vecn | Direction vector. You may use an f32-type array or structure. |
| vech | User-specified half-angle vector. You may use an f32-type array or structure. |
None.
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 the GXLoadLightObjImm or GXLoadLightObjIndx function.
In contrast to the GXInitSpecularDirv function, which calculates the half-angle vector automatically by assuming the view vector as (0, 0, 1), this function allows users to specify the half-angle vector directly as an input argument. 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 are similar to those described in the GXInitSpecularDirv function's man page.
GXInitSpecularDirHA, GXLightObj Initialization Flow
2006/03/01 Initial version.
CONFIDENTIAL