Sophie

Sophie

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

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

<HTML>
<BODY>
<PRE>
     <STRONG>NAME</STRONG>
	  <STRONG>glEvalMesh1,</STRONG> <STRONG>glEvalMesh2</STRONG> - compute a one- or two-dimensional
	  grid of points or lines


     <STRONG>C</STRONG> <STRONG>SPECIFICATION</STRONG>
	  void <STRONG>glEvalMesh1</STRONG>( GLenum <EM>mode</EM>,
			    GLint <EM>i1</EM>,
			    GLint <EM>i2</EM> )


     <STRONG>PARAMETERS</STRONG>
	  <EM>mode</EM>	In <STRONG>glEvalMesh1</STRONG>,	specifies whether to compute a one-
		dimensional mesh of points or lines.  Symbolic
		constants <STRONG>GL_POINT</STRONG> and <STRONG>GL_LINE</STRONG> are accepted.

	  <EM>i1</EM>, <EM>i2</EM>
		Specify	the first and last integer values for grid
		domain variable	i.

     <STRONG>C</STRONG> <STRONG>SPECIFICATION</STRONG>
	  void <STRONG>glEvalMesh2</STRONG>( GLenum <EM>mode</EM>,
			    GLint <EM>i1</EM>,
			    GLint <EM>i2</EM>,
			    GLint <EM>j1</EM>,
			    GLint <EM>j2</EM> )


     <STRONG>PARAMETERS</STRONG>
	  <EM>mode</EM> In <STRONG>glEvalMesh2</STRONG>, specifies whether to compute a two-
	       dimensional mesh	of points, lines, or polygons.
	       Symbolic	constants <STRONG>GL_POINT</STRONG>, <STRONG>GL_LINE</STRONG>, and <STRONG>GL_FILL</STRONG> are
	       accepted.

	  <EM>i1</EM>, <EM>i2</EM>
	       Specify the first and last integer values for grid
	       domain variable i.

	  <EM>j1</EM>, <EM>j2</EM>
	       Specify the first and last integer values for grid
	       domain variable j.

     <STRONG>DESCRIPTION</STRONG>
	  <STRONG>glMapGrid</STRONG> and	<STRONG>glEvalMesh</STRONG> are used in tandem to efficiently
	  generate and evaluate	a series of evenly-spaced map domain
	  values.  <STRONG>glEvalMesh</STRONG> steps through the	integer	domain of a
	  one- or two-dimensional grid,	whose range is the domain of
	  the evaluation maps specified	by <STRONG>glMap1</STRONG> and <STRONG>glMap2</STRONG>.  <EM>mode</EM>
	  determines whether the resulting vertices are	connected as
	  points, lines, or filled polygons.

	  In the one-dimensional case, <STRONG>glEvalMesh1</STRONG>, the	mesh is
	  generated as if the following	code fragment were executed:

	  glBegin (<EM>type</EM>);
	  for (i = <EM>i1</EM>; i &lt;= <EM>i2</EM>;	i += 1)
	       glEvalCoord1(i .	DELTA u	+ u sub	1)
	  glEnd();

	  where

	  DELTA	u = (u	- u ) /	1
		      2	   1

	  and n, u, and	u  are the arguments to	the most recent
		  1	 2
	  <STRONG>glMapGrid1</STRONG> command.  <EM>type</EM> is <STRONG>GL_POINTS</STRONG> if <EM>mode</EM> is <STRONG>GL_POINT</STRONG>,
	  or <STRONG>GL_LINES</STRONG> if <EM>mode</EM> is <STRONG>GL_LINE</STRONG>.

	  The one absolute numeric requirement is that if i = n, then
	  the value computed from

	  i . DELTA u +	u

	  is exactly u.

	  In the two-dimensional case, <STRONG>glEvalMesh2</STRONG>, let

	  DELTA	u = (u	- u )/n
		      2	   1

	  DELTA	v = (v - v )/m,
		      2	  1

	  where	n, u , u , m, v	, and v
		    1	2      1       2
	  are the arguments to the most	recent <STRONG>glMapGrid2</STRONG> command.
	  Then,	if <EM>mode</EM>	is <STRONG>GL_FILL</STRONG>, the	<STRONG>glEvalMesh2</STRONG> command is
	  equivalent to:

	  for (j = <EM>j1</EM>;	j &lt; <EM>j2</EM>;	j += 1)	{
	      glBegin (GL_QUAD_STRIP);
	      for (i = <EM>i1</EM>; i &lt;=	<EM>i2</EM>; i += 1) {
		  glEvalCoord2(i . DELTA u + u , j . DELTA v + v );
					      1			1
		  glEvalCoord2(i . DELTA u + u , (j+1) . DELTA v + v );
					      1			    1
	      }
	      glEnd();
	  }


	  If <EM>mode</EM> is <STRONG>GL_LINE</STRONG>, then a call to <STRONG>glEvalMesh2</STRONG> is equivalent
	  to:
	  for (j = <EM>j1</EM>;	j &lt;= <EM>j2</EM>; j += 1) {
	      glBegin(GL_LINE_STRIP);
	      for (i = <EM>i1</EM>; i &lt;=	<EM>i2</EM>; i += 1)
		  glEvalCoord2(i . DELTA u + u , j . DELTA v + v );
					      1			1
	      glEnd();
	  }
	  for (i = <EM>i1</EM>;	i &lt;= <EM>i2</EM>; i += 1) {
	      glBegin(GL_LINE_STRIP);
	      for (j = <EM>j1</EM>; j &lt;=	<EM>j1</EM>; j += 1)
		  glEvalCoord2)(i . DELTA u + u	, j . DELTA v +	v );
					       1		 1
	      glEnd();
	  }


	  And finally, if <EM>mode</EM> is <STRONG>GL_POINT</STRONG>, then a call	to <STRONG>glEvalMesh2</STRONG>
	  is equivalent	to:

	  glBegin (GL_POINTS);
	  for (j = <EM>j1</EM>;	j &lt;= <EM>j2</EM>; j += 1) {
	      for (i = <EM>i1</EM>; i &lt;=	<EM>i2</EM>; i += 1) {
		  glEvalCoord2(i . DELTA u + u , j . DELTA v + v );
					      1			1
	      }
	  }
	  glEnd();

	  In all three cases, the only absolute	numeric	requirements
	  are that if i	= n, then the value computed from
	  i . DELTA u +	u is exactly u ,
			 1	      2
	  and if j = m,
	  then the value computed from
	  j . DELTA v +	v is exactly v .
			 1	      2

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

	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>glEvalMesh</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>glGet</STRONG>	with argument <STRONG>GL_MAP1_GRID_DOMAIN</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_MAP2_GRID_DOMAIN</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_MAP1_GRID_SEGMENTS</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_MAP2_GRID_SEGMENTS</STRONG>

     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>

	  <STRONG>glBegin</STRONG>, <STRONG>glEvalCoord</STRONG>,	<STRONG>glEvalPoint</STRONG>, <STRONG>glMap1</STRONG>, <STRONG>glMap2</STRONG>, <STRONG>glMapGrid</STRONG>



















































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