Opentk/Source/Bind/Specifications/Docs/GL/glNormal.xml

200 lines
9.5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="glNormal">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>glNormal</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>glNormal</refname>
<refpurpose>set the current normal vector</refpurpose>
</refnamediv>
<!-- eqn: ignoring delim $$ -->
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3b</function></funcdef>
<paramdef>GLbyte <parameter>nx</parameter></paramdef>
<paramdef>GLbyte <parameter>ny</parameter></paramdef>
<paramdef>GLbyte <parameter>nz</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3d</function></funcdef>
<paramdef>GLdouble <parameter>nx</parameter></paramdef>
<paramdef>GLdouble <parameter>ny</parameter></paramdef>
<paramdef>GLdouble <parameter>nz</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3f</function></funcdef>
<paramdef>GLfloat <parameter>nx</parameter></paramdef>
<paramdef>GLfloat <parameter>ny</parameter></paramdef>
<paramdef>GLfloat <parameter>nz</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3i</function></funcdef>
<paramdef>GLint <parameter>nx</parameter></paramdef>
<paramdef>GLint <parameter>ny</parameter></paramdef>
<paramdef>GLint <parameter>nz</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3s</function></funcdef>
<paramdef>GLshort <parameter>nx</parameter></paramdef>
<paramdef>GLshort <parameter>ny</parameter></paramdef>
<paramdef>GLshort <parameter>nz</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>nx</parameter></term>
<term><parameter>ny</parameter></term>
<term><parameter>nz</parameter></term>
<listitem>
<para>
Specify the
<inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>,
<inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>,
and
<inlineequation><mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math></inlineequation>
coordinates of the new current normal.
The initial value of the current normal is the unit vector, (0, 0, 1).
</para>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3bv</function></funcdef>
<paramdef>const GLbyte * <parameter>v</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3dv</function></funcdef>
<paramdef>const GLdouble * <parameter>v</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3fv</function></funcdef>
<paramdef>const GLfloat * <parameter>v</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3iv</function></funcdef>
<paramdef>const GLint * <parameter>v</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>glNormal3sv</function></funcdef>
<paramdef>const GLshort * <parameter>v</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="parameters2"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>v</parameter></term>
<listitem>
<para>
Specifies a pointer to an array of three elements:
the
<inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>,
<inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>,
and
<inlineequation><mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math></inlineequation>
coordinates of the new current normal.
</para>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
The current normal is set to the given coordinates
whenever <function>glNormal</function> is issued.
Byte, short, or integer arguments are converted to floating-point
format with a linear mapping that maps the most positive representable integer
value to 1.0
and the most negative representable integer value to
<inlineequation><mml:math>
<!-- eqn: -1.0:-->
<mml:mn>-1.0</mml:mn>
</mml:math></inlineequation>.
</para>
<para>
Normals specified with <function>glNormal</function> need not have unit length.
If <constant>GL_NORMALIZE</constant> is enabled,
then normals of any length specified with <function>glNormal</function> are normalized after transformation.
If <constant>GL_RESCALE_NORMAL</constant> is enabled, normals are scaled by a scaling factor
derived from the modelview matrix. <constant>GL_RESCALE_NORMAL</constant> requires that the
originally specified normals were of unit length, and that the modelview
matrix contain only uniform scales for proper results.
To enable and disable normalization, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
with either <constant>GL_NORMALIZE</constant> or <constant>GL_RESCALE_NORMAL</constant>.
Normalization is initially disabled.
</para>
</refsect1>
<refsect1 id="notes"><title>Notes</title>
<para>
The current normal can be updated at any time.
In particular, <function>glNormal</function> can be called between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and
the corresponding call to <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
</para>
</refsect1>
<refsect1 id="associatedgets"><title>Associated Gets</title>
<para>
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_CURRENT_NORMAL</constant>
</para>
<para>
<citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_NORMALIZE</constant>
</para>
<para>
<citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_RESCALE_NORMAL</constant>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>