Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > eee00533ac83fd7ebbf9846dc6d3b77b > files > 125

Io-language-graphics-and-sound-20080330-6.fc15.i686.rpm

<HTML>
<BODY>
<PRE>
     <STRONG>NAME</STRONG>
	  <STRONG>glMap1d,</STRONG> <STRONG>glMap1f</STRONG> - define a one-dimensional evaluator


     <STRONG>C</STRONG> <STRONG>SPECIFICATION</STRONG>
	  void <STRONG>glMap1d</STRONG>(	GLenum <EM>target</EM>,
			GLdouble <EM>u1</EM>,
			GLdouble <EM>u2</EM>,
			GLint <EM>stride</EM>,
			GLint <EM>order</EM>,
			const GLdouble *<EM>points</EM> )
	  void <STRONG>glMap1f</STRONG>(	GLenum <EM>target</EM>,
			GLfloat	<EM>u1</EM>,
			GLfloat	<EM>u2</EM>,
			GLint <EM>stride</EM>,
			GLint <EM>order</EM>,
			const GLfloat *<EM>points</EM> )


     <STRONG>PARAMETERS</STRONG>
	  <EM>target</EM>  Specifies the	kind of	values that are	generated by
		  the evaluator.  Symbolic constants <STRONG>GL_MAP1_VERTEX_3</STRONG>,
		  <STRONG>GL_MAP1_VERTEX_4</STRONG>, <STRONG>GL_MAP1_INDEX</STRONG>, <STRONG>GL_MAP1_COLOR_4</STRONG>,
		  <STRONG>GL_MAP1_NORMAL</STRONG>, <STRONG>GL_MAP1_TEXTURE_COORD_1</STRONG>,
		  <STRONG>GL_MAP1_TEXTURE_COORD_2</STRONG>, <STRONG>GL_MAP1_TEXTURE_COORD_3</STRONG>,
		  and <STRONG>GL_MAP1_TEXTURE_COORD_4</STRONG> are accepted.

	  <EM>u1</EM>, <EM>u2</EM>  Specify a linear mapping of u, as presented to
		  <STRONG>glEvalCoord1</STRONG>,	to <STRONG>^</STRONG>, the variable that	is evaluated
		  by the equations specified by	this command.

	  <EM>stride</EM>  Specifies the	number of floats or doubles between
		  the beginning	of one control point and the beginning
		  of the next one in the data structure	referenced in
		  <EM>points</EM>.  This	allows control points to be embedded
		  in arbitrary data structures.	 The only constraint
		  is that the values for a particular control point
		  must occupy contiguous memory	locations.

	  <EM>order</EM>	  Specifies the	number of control points.  Must	be
		  positive.

	  <EM>points</EM>  Specifies a pointer to the array of control points.


     <STRONG>DESCRIPTION</STRONG>
	  Evaluators provide a way to use polynomial or	rational
	  polynomial mapping to	produce	vertices, normals, texture
	  coordinates, and colors.  The	values produced	by an
	  evaluator are	sent to	further	stages of GL processing	just
	  as if	they had been presented	using <STRONG>glVertex</STRONG>,	<STRONG>glNormal</STRONG>,
	  <STRONG>glTexCoord</STRONG>, and <STRONG>glColor</STRONG> commands, except that	the generated
	  values do not	update the current normal, texture
	  coordinates, or color.

	  All polynomial or rational polynomial	splines	of any degree
	  (up to the maximum degree supported by the GL
	  implementation) can be described using evaluators.  These
	  include almost all splines used in computer graphics:	B-
	  splines, Bezier curves, Hermite splines, and so on.

	  Evaluators define curves based on Bernstein polynomials.
	  Define p(<STRONG>^</STRONG>) as
					n
					R  n
			      p(<STRONG>^</STRONG>)  =  i=0Bi(<STRONG>^</STRONG>)Ri

	  where	R  is a	control	point and Bn(<STRONG>^</STRONG>)	is the ith Bernstein
	  polynom<STRONG>i</STRONG>al of	degree n (<EM>order</EM>	= n<STRONG>+</STRONG>1):

			    n	     (n	 ) i	 n-i
			   Bi(<STRONG>^</STRONG>)  =  |	 |<STRONG>^</STRONG> (1-<STRONG>^</STRONG>)
				     (i	 )
	  Recall that

			     0	       (n   )
			    0  <EM>=</EM> 1 and |    |  <EM>=</EM>  1
				       ( 0  )
	  <STRONG>glMap1</STRONG> is used to define the basis and to specify what kind
	  of values are	produced.  Once	defined, a map can be enabled
	  and disabled by calling <STRONG>glEnable</STRONG> and <STRONG>glDisable</STRONG> with the map
	  name,	one of the nine	predefined values for <EM>target</EM> described
	  below.  <STRONG>glEvalCoord1</STRONG> evaluates the one-dimensional maps that
	  are enabled.	When
	  <STRONG>glEvalCoord1</STRONG> presents	a value	u, the Bernstein functions are
	  evaluated using <STRONG>^</STRONG>, where

				 <STRONG>^</STRONG>  =  _<STRONG>_</STRONG>_<STRONG>_</STRONG>_<STRONG>__</STRONG>
				       u2 - u1

	  <EM>target</EM> is a symbolic constant	that indicates what kind of
	  control points are provided in <EM>points</EM>, and what output is
	  generated when the map is evaluated.	It can assume one of
	  nine predefined values:

	  <STRONG>GL_MAP1_VERTEX_3</STRONG>	   Each	control	point is three
				   floating-point values representing
				   x, y, and z.	 Internal <STRONG>glVertex3</STRONG>
				   commands are	generated when the map
				   is evaluated.

	  <STRONG>GL_MAP1_VERTEX_4</STRONG>	   Each	control	point is four
				   floating-point values representing
				   x, y, z, and	w.  Internal <STRONG>glVertex4</STRONG>
				   commands are	generated when the map
				   is evaluated.

	  <STRONG>GL_MAP1_INDEX</STRONG>		   Each	control	point is a single
				   floating-point value	representing a
				   color index.	 Internal <STRONG>glIndex</STRONG>
				   commands are	generated when the map
				   is evaluated	but the	current	index
				   is not updated with the value of
				   these <STRONG>glIndex</STRONG> commands.

	  <STRONG>GL_MAP1_COLOR_4</STRONG>	   Each	control	point is four
				   floating-point values representing
				   red,	green, blue, and alpha.
				   Internal <STRONG>glColor4</STRONG> commands are
				   generated when the map is evaluated
				   but the current color is not
				   updated with	the value of these
				   <STRONG>glColor4</STRONG> commands.

	  <STRONG>GL_MAP1_NORMAL</STRONG>	   Each	control	point is three
				   floating-point values representing
				   the x, y, and z components of a
				   normal vector.  Internal <STRONG>glNormal</STRONG>
				   commands are	generated when the map
				   is evaluated	but the	current	normal
				   is not updated with the value of
				   these <STRONG>glNormal</STRONG> commands.

	  <STRONG>GL_MAP1_TEXTURE_COORD_1</STRONG>  Each	control	point is a single
				   floating-point value	representing
				   the s texture coordinate.  Internal
				   <STRONG>glTexCoord1</STRONG> commands	are generated
				   when	the map	is evaluated but the
				   current texture coordinates are not
				   updated with	the value of these
				   <STRONG>glTexCoord</STRONG> commands.

	  <STRONG>GL_MAP1_TEXTURE_COORD_2</STRONG>  Each	control	point is two
				   floating-point values representing
				   the s and t texture coordinates.
				   Internal
				   <STRONG>glTexCoord2</STRONG> commands	are generated
				   when	the map	is evaluated but the
				   current texture coordinates are not
				   updated with	the value of these
				   <STRONG>glTexCoord</STRONG> commands.

	  <STRONG>GL_MAP1_TEXTURE_COORD_3</STRONG>  Each	control	point is three
				   floating-point values representing
				   the s, t, and r texture
				   coordinates.	 Internal <STRONG>glTexCoord3</STRONG>
				   commands are	generated when the map
				   is evaluated	but the	current
				   texture coordinates are not updated
				   with	the value of these <STRONG>glTexCoord</STRONG>
				   commands.

	  <STRONG>GL_MAP1_TEXTURE_COORD_4</STRONG>  Each	control	point is four
				   floating-point values representing
				   the s, t, r,	and q texture
				   coordinates.	 Internal
				   <STRONG>glTexCoord4</STRONG> commands	are generated
				   when	the map	is evaluated but the
				   current texture coordinates are not
				   updated with	the value of these
				   <STRONG>glTexCoord</STRONG> commands.

	  <EM>stride</EM>, <EM>order</EM>, and <EM>points</EM> define the array addressing	for
	  accessing the	control	points.	 <EM>points</EM>	is the location	of the
	  first	control	point, which occupies one, two,	three, or four
	  contiguous memory locations, depending on which map is being
	  defined.  <EM>order</EM> is the number	of control points in the
	  array.  <EM>stride</EM> specifies how many float or double locations
	  to advance the internal memory pointer to reach the next
	  control point.

     <STRONG>NOTES</STRONG>
	  As is	the case with all GL commands that accept pointers to
	  data,	it is as if the	contents of <EM>points</EM> were	copied by
	  <STRONG>glMap1</STRONG> before	<STRONG>glMap1</STRONG> returns.	 Changes to the	contents of
	  <EM>points</EM> have no effect	after <STRONG>glMap1</STRONG> is	called.

     <STRONG>ERRORS</STRONG>
	  <STRONG>GL_INVALID_ENUM</STRONG> is generated if <EM>target</EM> is not	an accepted
	  value.

	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if <EM>u1</EM> is equal to <EM>u2</EM>.

	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if <EM>stride</EM> is less than the
	  number of values in a	control	point.

	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if <EM>order</EM> is less than 1	or
	  greater than the return value	of <STRONG>GL_MAX_EVAL_ORDER</STRONG>.

	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>glMap1</STRONG> is executed
	  between the execution	of <STRONG>glBegin</STRONG> and the corresponding
	  execution of <STRONG>glEnd</STRONG>.

     <STRONG>ASSOCIATED</STRONG>	<STRONG>GETS</STRONG>
	  <STRONG>glGetMap</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_MAX_EVAL_ORDER</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_VERTEX_3</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_VERTEX_4</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_INDEX</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_COLOR_4</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_NORMAL</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_1</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_2</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_3</STRONG>
	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_4</STRONG>

     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>
	  <STRONG>glBegin</STRONG>, <STRONG>glColor</STRONG>, <STRONG>glEnable</STRONG>, <STRONG>glEvalCoord</STRONG>, <STRONG>glEvalMesh</STRONG>,
	  <STRONG>glEvalPoint</STRONG>, <STRONG>glMap2</STRONG>, <STRONG>glMapGrid</STRONG>, <STRONG>glNormal</STRONG>, <STRONG>glTexCoord</STRONG>,
	  <STRONG>glVertex</STRONG>








































</PRE>
</BODY>
</HTML>