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>GXInitSpecularDirHA</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXInitSpecularDirHA</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>void GXInitSpecularDirHA(
18<A href="../Structures/GXLightObj.html">GXLightObj</A>* lt_obj,
19f32         nx,
20f32         ny,
21f32         nz,
22f32         hx,
23f32         hy,
24f32         hz );</CODE></PRE>
25</DL>
26<H2>Arguments</H2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <TBODY>
29    <TR>
30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>lt_obj</CODE></STRONG></EM></TD>
31<TD width="520">Pointer to a light object.</TD>
32    </TR>
33    <TR>
34<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>nx</CODE></STRONG></EM></TD>
35<TD width="520">X component of the light direction.</TD>
36    </TR>
37    <TR>
38<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>ny</CODE></STRONG></EM></TD>
39<TD width="520">Y component of the light direction.</TD>
40    </TR>
41    <TR>
42<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>nz</CODE></STRONG></EM></TD>
43<TD width="520">Z component of light direction.</TD>
44    </TR>
45    <TR>
46<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>hx</CODE></STRONG></EM></TD>
47<TD width="520">X component of the user-specified half-angle vector.</TD>
48    </TR>
49    <TR>
50<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>hy</CODE></STRONG></EM></TD>
51<TD width="520">Y component of the user-specified half-angle vector.</TD>
52    </TR>
53    <TR>
54<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>hz</CODE></STRONG></EM></TD>
55<TD width="520">Z component of the user-specified half-angle vector.</TD>
56    </TR>
57  </TBODY>
58</TABLE>
59<H2>Return Values</H2>
60<P>None.</P>
61<H2>Description</H2>
62<P>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.&nbsp;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>
63<P>In contrast to <a href="GXInitSpecularDir.html"><code>GXInitSpecularDir</code></a>, 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.</P>
64<P>(The half-angle vector refers to the vector halfway between the light vector and the view vector.)</P>
65<P>Other notes are similar to that described in <a href="GXInitSpecularDir.html"><code>GXInitSpecularDir</code></a> man page.</P>
66<H2>See Also</H2>
67<P><code><a href="GXInitSpecularDir.html">GXInitSpecularDir</a><br> <a href="GXLoadLightObjImm.html">GXLoadLightObjImm</a></code><br> <a href="GXLoadLightObjIndx.html"><code>GXLoadLightObjIndx</code></a><br> <a href="GXSetChanCtrl.html"><code>GXSetChanCtrl</code></a></P>
68<P><A href="GXLightObjInitFlow.html">GXLightObj Initialization Flow</A></P>
69<H2>Revision History</H2>
70<P>03/01/2006 Initial version.</P>
71</BODY>
72</HTML>