Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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="glClipPlane"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glClipPlane</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glClipPlane</refname> | |
17 | <refpurpose>specify a plane against which all geometry is clipped</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glClipPlane</function></funcdef> | |
23 | <paramdef>GLenum <parameter>plane</parameter></paramdef> | |
24 | <paramdef>const GLdouble * <parameter>equation</parameter></paramdef> | |
25 | </funcprototype> | |
26 | </funcsynopsis> | |
27 | </refsynopsisdiv> | |
28 | <!-- eqn: ignoring delim $$ --> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>plane</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specifies which clipping plane is being positioned. | |
36 | Symbolic names of the form <constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis>, | |
37 | where <emphasis>i</emphasis> is an integer between 0 and <constant>GL_MAX_CLIP_PLANES</constant> | |
38 | <inlineequation><mml:math> | |
39 | <!-- eqn: - 1:--> | |
40 | <mml:mn>-1</mml:mn> | |
41 | </mml:math></inlineequation>, | |
42 | are accepted. | |
43 | </para> | |
44 | </listitem> | |
45 | </varlistentry> | |
46 | <varlistentry> | |
47 | <term><parameter>equation</parameter></term> | |
48 | <listitem> | |
49 | <para> | |
50 | Specifies the address of an array of four double-precision floating-point values. | |
51 | These values are interpreted as a plane equation. | |
52 | </para> | |
53 | </listitem> | |
54 | </varlistentry> | |
55 | </variablelist> | |
56 | </refsect1> | |
57 | <refsect1 id="description"><title>Description</title> | |
58 | <para> | |
59 | Geometry is always clipped against the boundaries of a six-plane frustum | |
60 | in <emphasis>x</emphasis>, <emphasis>y</emphasis>, and <emphasis>z</emphasis>. | |
61 | <function>glClipPlane</function> allows the specification of additional planes, | |
62 | not necessarily perpendicular to the <emphasis>x</emphasis>, <emphasis>y</emphasis>, or <emphasis>z</emphasis> axis, | |
63 | against which all geometry is clipped. | |
64 | To determine the maximum number of additional clipping planes, call | |
65 | <citerefentry><refentrytitle>glGetIntegerv</refentrytitle></citerefentry> with argument <constant>GL_MAX_CLIP_PLANES</constant>. All | |
66 | implementations support at least six such clipping planes. | |
67 | Because the resulting clipping region is the intersection | |
68 | of the defined half-spaces, | |
69 | it is always convex. | |
70 | </para> | |
71 | <para> | |
72 | <function>glClipPlane</function> specifies a half-space using a four-component plane equation. | |
73 | When <function>glClipPlane</function> is called, | |
74 | <parameter>equation</parameter> is transformed by the inverse of the modelview matrix | |
75 | and stored in the resulting eye coordinates. | |
76 | Subsequent changes to the modelview matrix have no effect on the | |
77 | stored plane-equation components. | |
78 | If the dot product of the eye coordinates of a vertex with the | |
79 | stored plane equation components is positive or zero, | |
80 | the vertex is <emphasis>in</emphasis> with respect to that clipping plane. | |
81 | Otherwise, it is <emphasis>out</emphasis>. | |
82 | </para> | |
83 | <para> | |
84 | To enable and disable clipping planes, call | |
85 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with the argument | |
86 | <constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis>, | |
87 | where <emphasis>i</emphasis> is the plane number. | |
88 | </para> | |
89 | <para> | |
90 | All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates | |
91 | and are | |
92 | disabled. | |
93 | </para> | |
94 | </refsect1> | |
95 | <refsect1 id="notes"><title>Notes</title> | |
96 | <para> | |
97 | It is always the case that <constant>GL_CLIP_PLANE</constant> | |
98 | <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation> | |
99 | = <constant>GL_CLIP_PLANE0</constant> + | |
100 | <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>. | |
101 | </para> | |
102 | </refsect1> | |
103 | <refsect1 id="errors"><title>Errors</title> | |
104 | <para> | |
105 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>plane</parameter> is not an accepted value. | |
106 | </para> | |
107 | <para> | |
108 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClipPlane</function> | |
109 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
110 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
111 | </para> | |
112 | </refsect1> | |
113 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
114 | <para> | |
115 | <citerefentry><refentrytitle>glGetClipPlane</refentrytitle></citerefentry> | |
116 | </para> | |
117 | <para> | |
118 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis> | |
119 | </para> | |
120 | </refsect1> | |
121 | <refsect1 id="seealso"><title>See Also</title> | |
122 | <para> | |
123 | <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> | |
124 | </para> | |
125 | </refsect1> | |
126 | <refsect1 id="Copyright"><title>Copyright</title> | |
127 | <para> | |
128 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
129 | Silicon Graphics, Inc. This document is licensed under the SGI | |
130 | Free Software B License. For details, see | |
131 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
132 | </para> | |
133 | </refsect1> | |
134 | </refentry> |