VTK焦点和位置之间的相机差异 [英] VTKCamera difference between focal point and position
问题描述
我正在使用vtkCamera,并且会尝试将其移动并使其看起来在某个点上.例如,如果我想将相机放置在位置(x,y,z)
并使其在(0,0,0)
位置,例如使用openGL中的gluLookAt,则将眼睛坐标设置为(x,y,z)
并将中心坐标设置为(0,0,0)
并向上向量到(0,1,0)
.
I am using the vtkCamera and would am trying to move it around and make it look at a certain point. For example, if I want to put the camera at position (x,y,z)
and make it look at (0,0,0)
for example with gluLookAt in openGL we would set the eye coordinates to (x,y,z)
and the centre coordinates to (0,0,0)
and the up vector to (0,1,0)
.
但是在vtk中,使用vtkCamera我们有三种单独的方法,分别是setPosition
,setFocalPoint
和setViewUp
In vtk however, using the vtkCamera we have three separate methods, namely setPosition
, setFocalPoint
and setViewUp
我的问题是setPositon
和setFocalPoint
对应什么?
my question is what do setPositon
and setFocalPoint
correspond to?
谢谢
推荐答案
setPosition
对应于眼睛坐标. setFocalPoint
对应于相机所处的位置,因此gluLookAt
.在这种意义上,它的功能与openGL和DirectX相同.
setPosition
corresponds to eye coordinates. setFocalPoint
corresponds to where the camera is looking, so gluLookAt
. It functions the same way as both openGL and DirectX in that sense.
这篇关于VTK焦点和位置之间的相机差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!