⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fglmap1.html

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 HTML
字号:
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>fglMap1d,</STRONG> <STRONG>fglMap1f</STRONG> - define a	one-dimensional	evaluator     <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG>	  SUBROUTINE <STRONG>fglMap1d</STRONG>( INTEGER*4 <EM>target</EM>,			       REAL*8 <EM>u1</EM>,			       REAL*8 <EM>u2</EM>,			       INTEGER*4 <EM>stride</EM>,			       INTEGER*4 <EM>order</EM>,			       CHARACTER*8 <EM>points</EM> )	  SUBROUTINE <STRONG>fglMap1f</STRONG>( INTEGER*4 <EM>target</EM>,			       REAL*4 <EM>u1</EM>,			       REAL*4 <EM>u2</EM>,			       INTEGER*4 <EM>stride</EM>,			       INTEGER*4 <EM>order</EM>,			       CHARACTER*8 <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>fglEvalCoord1</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>fglVertex</STRONG>, <STRONG>fglNormal</STRONG>,	  <STRONG>fglTexCoord</STRONG>, and <STRONG>fglColor</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>fglMap1</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>fglEnable</STRONG> and	<STRONG>fglDisable</STRONG> with	the	  map name, one	of the nine predefined values for <EM>target</EM>	  described below.  <STRONG>fglEvalCoord1</STRONG> evaluates the	one-	  dimensional maps that	are enabled.  When	  <STRONG>fglEvalCoord1</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>fglVertex3</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>fglVertex4</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>fglIndex</STRONG>				   commands are	generated when the map				   is evaluated	but the	current	index				   is not updated with the value of				   these <STRONG>fglIndex</STRONG> commands.	  <STRONG>GL_MAP1_COLOR_4</STRONG>	   Each	control	point is four				   floating-point values representing				   red,	green, blue, and alpha.				   Internal <STRONG>fglColor4</STRONG> commands are				   generated when the map is evaluated				   but the current color is not				   updated with	the value of these				   <STRONG>fglColor4</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>fglNormal</STRONG>				   commands are	generated when the map				   is evaluated	but the	current	normal				   is not updated with the value of				   these <STRONG>fglNormal</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>fglTexCoord1</STRONG>	commands are generated				   when	the map	is evaluated but the				   current texture coordinates are not				   updated with	the value of these				   <STRONG>fglTexCoord</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>fglTexCoord2</STRONG>	commands are generated				   when	the map	is evaluated but the				   current texture coordinates are not				   updated with	the value of these				   <STRONG>fglTexCoord</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>fglTexCoord3</STRONG>				   commands are	generated when the map				   is evaluated	but the	current				   texture coordinates are not updated				   with	the value of these <STRONG>fglTexCoord</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>fglTexCoord4</STRONG>	commands are generated				   when	the map	is evaluated but the				   current texture coordinates are not				   updated with	the value of these				   <STRONG>fglTexCoord</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>fglMap1</STRONG> before <STRONG>fglMap1</STRONG> returns.  Changes to the contents of	  <EM>points</EM> have no effect	after <STRONG>fglMap1</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>fglMap1</STRONG> is executed	  between the execution	of <STRONG>fglBegin</STRONG> and	the corresponding	  execution of <STRONG>fglEnd</STRONG>.     <STRONG>ASSOCIATED</STRONG>	<STRONG>GETS</STRONG>	  <STRONG>fglGetMap</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_MAX_EVAL_ORDER</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_VERTEX_3</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_VERTEX_4</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_INDEX</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_COLOR_4</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_NORMAL</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_1</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_2</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_3</STRONG>	  <STRONG>fglIsEnabled</STRONG> with argument <STRONG>GL_MAP1_TEXTURE_COORD_4</STRONG>     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>fglBegin</STRONG>, <STRONG>fglColor</STRONG>, <STRONG>fglEnable</STRONG>, <STRONG>fglEvalCoord</STRONG>, <STRONG>fglEvalMesh</STRONG>,	  <STRONG>fglEvalPoint</STRONG>,	<STRONG>fglMap2</STRONG>, <STRONG>fglMapGrid</STRONG>, <STRONG>fglNormal</STRONG>,	<STRONG>fglTexCoord</STRONG>,	  <STRONG>fglVertex</STRONG></PRE></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -