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<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/gx.h></CODE></PRE> 16 <DD> 17<PRE><CODE>#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)))</CODE></PRE> 21</DL> 22<H2>Arguments</H2> 23<TABLE border="1" cellpadding="3" cellspacing="0.1"> 24 <TBODY> 25 <TR> 26<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>lo</CODE></STRONG></EM></TD> 27<TD width="520">Pointer to a light object.</TD> 28 </TR> 29 <TR> 30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>vecn</CODE></STRONG></EM></TD> 31<TD width="520">Direction vector. <BR>You may use an array of <CODE>f32</CODE> type or structure.</TD> 32 </TR> 33 <TR> 34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>vech</CODE></STRONG></EM></TD> 35<TD width="520">User-specified half-angle vector. <BR>You may use an array of <CODE>f32</CODE> type or structure.</TD> 36 </TR> 37 </TBODY> 38</TABLE> 39<H2>Return Values</H2> 40<P>None.</P> 41<H2>Description</H2> 42<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 <a href="GXLoadLightObjImm.html"><code>GXLoadLightObjImm</code></a> or <a href="GXLoadLightObjIndx.html"><code>GXLoadLightObjIndx</code></a>.</P> 43<P>In contrast to <a href="GXInitSpecularDirv.html"><code>GXInitSpecularDirv</code></a> 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.</P> 44<P><B>Note:</B> 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.</P> 45<P>Other notes are similar to those described in the <a href="GXInitSpecularDirv.html"><code>GXInitSpecularDirv</code></a> man page.</P> 46<H2>See Also</H2> 47<P><A href="GXInitSpecularDirHA.html"><CODE>GXInitSpecularDirHA</CODE></A></P> 48<P><A href="GXLightObjInitFlow.html">GXLightObj Initialization Flow</A></P> 49<H2>Revision History</H2> 50<P>03/01/2006 Initial version.</P> 51</BODY> 52</HTML>