[vtkusers] How to define camera from input

curator curator at gmx.de
Thu May 22 09:07:56 EDT 2014


Dear all,
I am currently working on vtk tool, where I need to adjust the camera 
position from a given sketchup rendering. So, I have a sketchup camera 
[1] and I need to export their values and import them in a vtk 
camera[2]. So, this question is not actually about the data transfer 
itself, but on the data conversion.

I think, the eye, target and up vectors of sketchup are sufficient to 
describe the camera, since target includes distance and, thus, zoom. Is 
that correct? But, how do I convert these values to vtkCamera?

My first guess:
eye --> setEyePosition
ViewUp -->setViewUp
target-pos --> setFocalPoint

But the result looks wrong. Any better ideas?

kind regards,
curator

[1] http://www.sketchup.com/intl/en/developer/docs/ourdoc/camera
[2] http://www.vtk.org/doc/nightly/html/classvtkCamera.html


More information about the vtkusers mailing list