[vtkusers] VTK Stereo - Help Rendering Left & Right Eye Separately

Teek EZ7543 at wayne.edu
Tue Jun 20 15:01:25 EDT 2017


Just wanted to give a quick update. The methods suggested by both David and
Sankhesh worked.
Ended up going with the ExternalVTKWidget however. Really simple integration
and was able to incorporate it directly into the zSpace Sample application
as you mentioned I could!

Thanks Everyone,
Teek


Sankhesh Jhaveri-2 wrote
> Hi Teek,
> 
> You can use the vtkRenderWindow::SetStereoTypeToLeft()
> <http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html#a69e5ee012eb84d708851360b8f0706df>
> and vtkRenderWindow::SetStereoTypeToRight()
> <http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html#af4b1162e9f6cfed54e8ea3bb2ec0e900>
> API to tell VTK which eye you’re rendering.
> 
> Hope that helps.
> 
> Sankhesh

--


VTK - Users mailing list wrote
> You should be able to write a subclass of vtkWin32OpenGLRenderWindow
> (or whatever **actual** vtkRenderWindow subclass gets instantiated for
> your app) and then provide your own overrides of the methods
> StereoUpdate, StereoMidpoint, and StereoRenderComplete.
> 
> In the StereoUpdate method, call the parent method first, and then
> call camera->SetEyePosition to be at the left eye. In the
> StereoMidpoint method, call the parent method first, and then call
> camera->SetEyePosition to be at the right eye.
> 
> In the StereoRenderComplete method, call the parent method first, and
> then call camera->SetEyePosition back to its pre-stereo rendering
> values.
> 
> The trick with SetEyePosition calls is that they coordinates have to
> be in **camera** space, not world space.
> 
> 
> HTH,
> David C.





--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Stereo-Help-Rendering-Left-Right-Eye-Separately-tp5743559p5743697.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list