1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>GXInitSpecularDirHAv</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">GXInitSpecularDirHAv</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17#define GXInitSpecularDirHAv(lo,vecn,vech) \ 18 (GXInitSpecularDirHA((lo), \ 19 *(f32*)(vecn), *((f32*)(vecn)+1), *((f32*)(vecn)+2), \ 20 *(f32*)(vech), *((f32*)(vech)+1), *((f32*)(vech)+2))) 21</pre></dd></dl> 22 23<H2>Arguments</H2> 24<TABLE class="arguments" border="1" > 25 <TBODY> 26 <TR> 27<TH>lo</TH> 28<TD>Pointer to a light object.</TD> 29 </TR> 30 <TR> 31<TH>vecn</TH> 32<TD>Direction vector. You may use an <CODE>f32</CODE>-type array or structure.</TD> 33 </TR> 34 <TR> 35<TH>vech</TH> 36<TD>User-specified half-angle vector. You may use an <CODE>f32</CODE>-type array or structure.</TD> 37 </TR> 38 </TBODY> 39</TABLE> 40 41<H2>Return Values</H2> 42<P>None.</P> 43 44<H2>Description</H2> 45<P>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 <A href="GXLoadLightObjImm.html"><CODE>GXLoadLightObjImm</CODE></A> or <A href="GXLoadLightObjIndx.html"><CODE>GXLoadLightObjIndx</CODE></A> function.</P> 46<P>In contrast to the <A href="GXInitSpecularDirv.html"><CODE>GXInitSpecularDirv</CODE></A> 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.</P> 47<P>(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.))</P> 48<P>Other notes are similar to those described in the <A href="GXInitSpecularDirv.html"><CODE>GXInitSpecularDirv</CODE></A> function's man page.</P> 49 50<H2>See Also</H2> 51<P class="reference"> 52<A href="GXInitSpecularDirHA.html">GXInitSpecularDirHA</A>, 53<A href="GXLightObjInitFlow.html">GXLightObj Initialization Flow</A> 54</P> 55 56<H2>Revision History</H2> 57<P> 582006/03/01 Initial version.<br> 59</P> 60 61<hr><p>CONFIDENTIAL</p></body> 62</HTML>