<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glClipPlane</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glClientActiveTextureARB.3G.xml" title="glClientActiveTextureARB"/><link rel="next" href="glColor.3G.xml" title="glColor"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glClipPlane</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glClientActiveTextureARB.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glColor.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glClipPlane.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glClipPlane.3G-name"/><h2>Name</h2><p>glClipPlane &#8212; specify a plane against which all geometry is clipped</p></div><div class="refsynopsisdiv"><a name="glClipPlane.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glClipPlane</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>plane</tt></i>, const GLdouble *<i><tt>equation</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glClipPlane.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glClipPlane</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>plane</tt></i>, <i><tt>equation</tt></i>[]) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>plane</tt></i></span></dt><dd>
						Specifies which clipping plane is being positioned. Symbolic names of the form
						<tt>GL_CLIP_PLANE</tt><span class="emphasis"><em>i</em></span>, where <span class="emphasis"><em>i</em></span> is an integer
						between 0 and <tt>GL_MAX_CLIP_PLANES</tt>&#8201;-&#8201;1, are accepted.
					</dd><dt><span class="term"><i><tt>equation</tt></i></span></dt><dd>
						Specifies the address of an array of four double-precision floating-point values. These values are
						interpreted as a plane equation.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-description"/><h2>Description</h2><p>
			Geometry is always clipped against the boundaries of a six-plane frustum in <i><tt>x</tt></i>,
			<i><tt>y</tt></i>, and <i><tt>z</tt></i>. <tt>glClipPlane</tt> allows the specification of
			additional planes, not necessarily perpendicular to the <i><tt>x</tt></i>, <i><tt>y</tt></i>, or
			<i><tt>z</tt></i> axis, against which all geometry is clipped. To determine the maximum number of additional
			clipping planes, call <a href="glGet.3G.xml"><tt>glGetIntegerv</tt></a> with argument
			<tt>GL_MAX_CLIP_PLANES</tt>. All implementations support at least six such clipping planes. Because the
			resulting clipping region is the intersection of the defined half-spaces, it is always convex.
		</p><p>
			<tt>glClipPlane</tt> specifies a half-space using a four-component plane equation. When
			<tt>glClipPlane</tt> is called, <i><tt>equation</tt></i> is transformed by the inverse of the
			modelview matrix and stored in the resulting eye coordinates. Subsequent changes to the modelview matrix have no effect
			on the stored plane-equation components. If the dot product of the eye coordinates of a vertex with the stored plane
			equation components is positive or zero, the vertex is <i><tt>in</tt></i> with respect to that clipping plane.
			Otherwise, it is <i><tt>out</tt></i>.
		</p><p>
			To enable and disable clipping planes, call <a href="glEnable.3G.xml"><tt>glEnable</tt></a> and <a href="glEnable.3G.xml"><tt>glDisable</tt></a> with the argument <tt>GL_CLIP_PLANE</tt><i><tt>i</tt></i>,
			where <i><tt>i</tt></i> is the plane number.
		</p><p>
			All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates and are disabled.
		</p></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-notes"/><h2>Notes</h2><p>
			It is always the case that
			<tt>GL_CLIP_PLANE<span class="emphasis"><em>i</em></span></tt>&#8201;=&#8201;<tt>GL_CLIP_PLANE0</tt>&#8201;+&#8201;<span class="emphasis"><em>i</em></span>.
		</p></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if <i><tt>plane</tt></i> is not an accepted value.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glClipPlane</tt> is executed between the
			execution of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-associated_gets"/><h2>Associated Gets</h2><p>
			<a href="glGetClipPlane.3G.xml"><tt>glGetClipPlane</tt></a>
		</p><p>
			<a href="glIsEnabled.3G.xml"><tt>glIsEnabled</tt></a> with argument
			<tt>GL_CLIP_PLANE</tt><i><tt>i</tt></i>
		</p></div><div class="refsect1" lang="en"><a name="glClipPlane.3G-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glEnable.3G.xml">glEnable</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glClientActiveTextureARB.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glColor.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glClientActiveTextureARB </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glColor</td></tr></table></div></body></html>
