#include <revolution/gx.h>
void GXInitSpecularDirHA(
GXLightObj* lt_obj,
f32 nx,
f32 ny,
f32 nz,
f32 hx,
f32 hy,
f32 hz );
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. |
None.
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 GXLoadLightObjImm or GXLoadLightObjIndx.
In contrast to GXInitSpecularDir, which calculates a half-angle vector automatically by assuming the view vector as (0, 0, 1), this function lets you specify the half-angle vector directly as input arguments. It's useful to do detailed control for orientation of highlights. The half-angle vector is required to be normalized.
(The half-angle vector refers to the vector halfway between the light vector and the view vector.)
Other notes are similar to that described in GXInitSpecularDir man page.
GXInitSpecularDir
GXLoadLightObjImm
GXLoadLightObjIndx
GXSetChanCtrl
GXLightObj Initialization Flow
03/01/2006 Initial version.