[vtkusers] synchronize model view transformations between opengl and vtk windows

Jana Sefcikova neollie at gmail.com
Tue Aug 7 18:00:51 EDT 2012

Hi Dan,
all matrices can be found in vtkCamera (vtkCamera ::GetModelViewMatrix;
vtkCamera::GetProjectionTransformMatrix). Also vtkOpenGLCamera::Render()
method could serve as good starting point, because also viewport is
preseted there.

For direction VTK -> Opengl , this could be inspiration
In vtkCameraObserver there, you can implement code that update your OpenGL
state (instead of mine case, where I wanted update vtk algorithm) .

For oposite direction this thread could be inspiration
There is no direct method to set model view matrix, it is necessary use
vtkCamera methods to preset camera (at least as I know )

Also I think that if you preset both contexts to same initial composition
(modelview matrix or perhaps only view matrix), than you could use only
vtkCamera::SetUserTransform and vtkCamera::GetUserTransform (for model
matrix) for synchronization.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120808/0cb715f1/attachment.htm>

More information about the vtkusers mailing list