Changes between Version 10 and Version 11 of MousePicking

Show
Ignore:
Author:
bhook (IP: 64.207.62.170)
Timestamp:
05/18/06 14:53:28 (13 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MousePicking

    v10 v11  
    120120\end{eqnarray*} 
    121121}}} 
     122 
     123So we need to do the inverse of this process by rearranging to solve for '''n''': 
     124 
     125{{{ 
     126#!latex-math-hook 
     127 
     128\begin{equation*} 
     129\label{eqn:vp to ndc} 
     130{\boldsymbol n} = \begin{pmatrix} 
     131\frac{ 2{\boldsymbol v}_x }w - 1\\  
     132\frac{ 2{\boldsymbol v}_y }{h}\\ 
     1332{\boldsymbol v}_z - 1\\ 
     1341 
     135\end{pmatrix} 
     136\end{equation*} 
     137}}} 
     138 
     139Okay, not so bad. The only real question is the {{{z}}} component of '''v'''.  We can either calculate that value by reading it back from the framebuffer, or ignore it by substituting 0, in which case we'll be computing a ray passing through '''v''' that we'll then have to intersect with world geometry to find the corresponding point in 3-space. 
     140 
     141From here we need to go to clip coordinates, which, if you recall, are the homogeneous versions of the NDC coordinates (i.e. ''w'' != 1.0). Since ''w'' is already 1.0 and the transformation back to clip 
     142coordinates is a scale by ''w'', this step can be skipped and we can assume that our NDC coordinates are the same as our clip coordinates. 
     143 
     144=== Clipping Space to View Space ===