[vtkusers] Set camera view along XY, XZ and YZ axis

madz madaramh at gmail.com
Mon Jan 20 04:15:24 EST 2014


I need to set the camera angle along my vtkCubeAxesActor in the directions of
XY, XZ and YZ. I tried the following code but it did not work.

        renderer->GetActiveCamera()->SetPosition(0,0,0);
	//renderer->GetActiveCamera()->SetFocalPoint(0,0,0);

SetFocalPoint(0,0,0) would render a blank screen with the actor nowhere on
sight. I found out that normally the focal point is at (0.75, 0.84, 0.92)
and if changed will result in haywire rotations (when rotating with mouse.)
and actor placed out of view.
And if I set the camera position to SetPosition(0,0,0) (without setting
focal point), and rotate the actor with the mouse and reset camera position
(SetPosition(0,0,0)) with button press, the new position is different from
the previous setPosition.

How can I correct these errors?
Thanks.





--
View this message in context: http://vtk.1045678.n5.nabble.com/Set-camera-view-along-XY-XZ-and-YZ-axis-tp5725516.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list