[vtkusers] Distance from eye to viewplane

David Gobbi david.gobbi at gmail.com
Sat Dec 18 02:05:14 EST 2010


2010/12/17 Vinicius Rogério Araujo Silva <vinicius.ras at gmail.com>

> Actually, R is not the radius of the cone's base. Rather, the radius is
> calculated based on the values of R and H.
> One more thing. A question about your example:
>
> Renderer->SetDisplayPoint(x, y, z);
> Renderer->DisplayToWorld();
> double p[3];
> Renderer->GetWorldPoint(p);
>
> Let me see if I understood it correctly.
> If I set Z to a value that is equal to the Near Clipping Plane's distance,
> then the output will be a point that lies on the near clipping plane?
>

Not quite.  In SetDisplayPoint(x, y, z), the "z" is a depth-buffer value in
the range [0, 1] where z=0 gives a point on the near clipping plane and z=1
gives a point on the far clipping plane.  The x and y are the screen pixel
offset from the lower left corner of the window.

  David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101218/4a1d9296/attachment.htm>


More information about the vtkusers mailing list