construct from vtkCamera from opengl Variables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

construct from vtkCamera from opengl Variables

Elhassan Abdou-2
Dear All,

I have a scene that I constructed using OpenGL and I want to rewrite the code using VTK.
So I have view matrix (compose of, scaling in z, and translation in the x,y,z).
I know I am rendering using perspective mode, so I have near plane, far plane and horizontalĀ  fov.

I tried to use vtkExternalOpenGL, but nothing is rendered.

Can anyone give me help on how to adjust vtkOpenGLCamera to use these parameters to render the scene?

Regards
Elhassan

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: construct from vtkCamera from opengl Variables

VTK - Users mailing list
If you have a scene that you want to render in VTK, the easiest would be to build a vtkDataset (vtkPolyData most likely) and then
render that in VTK. You don't need to worry about the OpenGL transform or interaction as VTK does this for you.

Take a look atĀ 
Cxx / GeometricObjects
for examples of how to do this.

Dan




On Sat, Dec 22, 2018 at 6:01 PM Elhassan Abdou <[hidden email]> wrote:
Dear All,

I have a scene that I constructed using OpenGL and I want to rewrite the code using VTK.
So I have view matrix (compose of, scaling in z, and translation in the x,y,z).
I know I am rendering using perspective mode, so I have near plane, far plane and horizontalĀ  fov.

I tried to use vtkExternalOpenGL, but nothing is rendered.

Can anyone give me help on how to adjust vtkOpenGLCamera to use these parameters to render the scene?

Regards
Elhassan
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers