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

📄 fgluproject.html

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 HTML
字号:
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>fgluProject</STRONG> -	map object coordinates to window coordinates     <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG>	  INTEGER*4 <STRONG>fgluProject</STRONG>( REAL*8	<EM>objX</EM>,				 REAL*8	<EM>objY</EM>,				 REAL*8	<EM>objZ</EM>,				 CHARACTER*8 <EM>model</EM>,				 CHARACTER*8 <EM>proj</EM>,				 CHARACTER*8 <EM>view</EM>,				 CHARACTER*8 <EM>winX</EM>,				 CHARACTER*8 <EM>winY</EM>,				 CHARACTER*8 <EM>winZ</EM> )     <STRONG>PARAMETERS</STRONG>	  <EM>objX</EM>,	<EM>objY</EM>, <EM>objZ</EM>			  Specify the object coordinates.	  <EM>model</EM>		  Specifies the	current	modelview matrix (as			  from a <STRONG>glGetDoublev</STRONG> call).	  <EM>proj</EM>		  Specifies the	current	projection matrix (as			  from a <STRONG>glGetDoublev</STRONG> call).	  <EM>view</EM>		  Specifies the	current	viewport (as from a			  <STRONG>glGetIntegerv</STRONG>	call).	  <EM>winX</EM>,	<EM>winY</EM>, <EM>winZ</EM>			  Return the computed window coordinates.     <STRONG>DESCRIPTION</STRONG>	  <STRONG>fgluProject</STRONG> transforms the specified object coordinates into	  window coordinates using <EM>model</EM>, <EM>proj</EM>,	and <EM>view</EM>. The result	  is stored in <EM>winX</EM>, <EM>winY</EM>, and <EM>winZ</EM>. A return value of <STRONG>GL_TRUE</STRONG>	  indicates success, a return value of <STRONG>GL_FALSE</STRONG>	indicates	  failure.	  To compute the coordinates, let v=(objX,objY,objZ,1.0)	  represented as a matrix with 4 rows and 1 column.  Then	  <STRONG>fgluProject</STRONG> computes v' as follows:	  v' = P x M x v	  where	P is the current projection matrix <EM>proj</EM>, M is the	  current modelview matrix <EM>model</EM> (both represented as 4x4	  matrices in column-major order) and 'x' represents matrix	  multiplication.	  The window coordinates are then computed as follows:	  winX = view(0) + view(2) * (v'(0) + 1) / 2	  winY = view(1) + view(3) * (v'(1) + 1) / 2	  winZ = (v'(2)	+ 1) / 2     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>glGet</STRONG>, <STRONG>fgluUnProject</STRONG></PRE></BODY></HTML>

⌨️ 快捷键说明

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