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
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/gx.h&gt;
16
17void GXInitSpecularDirHA(
18    <A href="../Structures/GXLightObj.html">GXLightObj</A>* lt_obj,
19    f32         nx,
20    f32         ny,
21    f32         nz,
22    f32         hx,
23    f32         hy,
24    f32         hz );
25</pre></dd></dl>
26
27<H2>Arguments</H2>
28<TABLE class="arguments" border="1" >
29  <TBODY>
30    <TR>
31<TH>lt_obj</TH>
32<TD>Pointer to a light object.</TD>
33    </TR>
34    <TR>
35<TH>nx</TH>
36<TD>X component of the light direction.</TD>
37    </TR>
38    <TR>
39<TH>ny</TH>
40<TD>Y component of the light direction.</TD>
41    </TR>
42    <TR>
43<TH>nz</TH>
44<TD>Z component of light direction.</TD>
45    </TR>
46    <TR>
47<TH>hx</TH>
48<TD>X component of the user-specified half-angle vector.</TD>
49    </TR>
50    <TR>
51<TH>hy</TH>
52<TD>Y component of the user-specified half-angle vector.</TD>
53    </TR>
54    <TR>
55<TH>hz</TH>
56<TD>Z component of the user-specified half-angle vector.</TD>
57    </TR>
58  </TBODY>
59</TABLE>
60
61<H2>Return Values</H2>
62<P>None.</P>
63
64<H2>Description</H2>
65<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 the <A href="GXLoadLightObjImm.html"><CODE>GXLoadLightObjImm</CODE></A> or <A href="GXLoadLightObjIndx.html"><CODE>GXLoadLightObjIndx</CODE></A> function.</P>
66<P>In contrast to the <A href="GXInitSpecularDir.html"><CODE>GXInitSpecularDir</CODE></A> function, 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>
67<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>
68<P>Other notes to be aware of are similar to those described in the <A href="GXInitSpecularDir.html"><CODE>GXInitSpecularDir</CODE></A> function's reference page.</P>
69
70<H2>See Also</H2>
71<P class="reference">
72<A href="GXInitSpecularDir.html">GXInitSpecularDir</A>,
73<A href="GXLoadLightObjImm.html">GXLoadLightObjImm</A>,
74<A href="GXLoadLightObjIndx.html">GXLoadLightObjIndx</A>,
75<A href="GXSetChanCtrl.html">GXSetChanCtrl</A>,
76<A href="GXLightObjInitFlow.html">GXLightObj Initialization Flow</A>
77</P>
78
79<H2>Revision History</H2>
80<P>
812006/03/01 Initial version.<br>
82</P>
83
84<hr><p>CONFIDENTIAL</p></body>
85</HTML>