include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / manglsl / faceforward.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="faceforward">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>faceforward</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>faceforward</refname>
17 <refpurpose>return a vector pointing in the same direction as another</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>genType <function>faceforward</function></funcdef>
23 <paramdef>genType <parameter>N</parameter></paramdef>
24 <paramdef>genType <parameter>I</parameter></paramdef>
25 <paramdef>genType <parameter>Nref</parameter></paramdef>
26 </funcprototype>
27 <funcprototype>
28 <funcdef>genDType <function>faceforward</function></funcdef>
29 <paramdef>genDType <parameter>N</parameter></paramdef>
30 <paramdef>genDType <parameter>I</parameter></paramdef>
31 <paramdef>genDType <parameter>Nref</parameter></paramdef>
32 </funcprototype>
33 </funcsynopsis>
34 </refsynopsisdiv>
35 <refsect1 id="parameters"><title>Parameters</title>
36 <variablelist>
37 <varlistentry>
38 <term><parameter>N</parameter></term>
39 <listitem>
40 <para>
41 Specifies the vector to orient.
42 </para>
43 </listitem>
44 </varlistentry>
45 <varlistentry>
46 <term><parameter>I</parameter></term>
47 <listitem>
48 <para>
49 Specifies the incident vector.
50 </para>
51 </listitem>
52 </varlistentry>
53 <varlistentry>
54 <term><parameter>Nref</parameter></term>
55 <listitem>
56 <para>
57 Specifies the reference vector.
58 </para>
59 </listitem>
60 </varlistentry>
61 </variablelist>
62 </refsect1>
63 <refsect1 id="description"><title>Description</title>
64 <para>
65 <function>faceforward</function> orients a vector to point away from a surface as defined by its normal.
66 If <citerefentry><refentrytitle>dot</refentrytitle></citerefentry><code>(<parameter>Nref</parameter>, <parameter>I</parameter>) &lt; 0</code>
67 <function>faceforward</function> returns <parameter>N</parameter>, otherwise it returns <code>-<parameter>N</parameter></code>.
68 </para>
69 </refsect1>
70 <refsect1 id="versions"><title>Version Support</title>
71 <informaltable frame="topbot">
72 #VARTABLECOLS#
73 <thead>
74 #FUNCTABLEHEADER#
75 <row>
76 <entry>faceforward (genType)</entry>#newin11#
77 </row>
78 <row>
79 <entry>faceforward (genDType)</entry>#newin40#
80 </row>
81 </thead>
82 </tgroup>
83 </informaltable>
84 </refsect1>
85 <refsect1 id="seealso"><title>See Also</title>
86 <para>
87 <citerefentry><refentrytitle>reflect</refentrytitle></citerefentry>,
88 <citerefentry><refentrytitle>refract</refentrytitle></citerefentry>
89 </para>
90 </refsect1>
91 <refsect1 id="Copyright"><title>Copyright</title>
92 <para>
93 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
94 This material may be distributed subject to the terms and conditions set forth in
95 the Open Publication License, v 1.0, 8 June 1999.
96 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
97 </para>
98 </refsect1>
99 </refentry>