[vtkusers] Camera orientations

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Sep 17 03:09:35 EDT 2001


hi,

>>>>> "RM" == Robert Mitchell <robmitch at eng.uts.edu.au> writes:

    RM> Dear All, Ive been trying to get a camera to snap to one of
    RM> the viewing planes after a user has interacted with the window
    RM> by rotating/scaling...  Take the XY plane for example - I
    RM> would like to have the direction of projection normal to this
    RM> plane ,as if one was looking at an XY graph.  I'm using
    RM> MFC/C++ and on interaction with a toolbar button, I am doing
    RM> the following;

This may or may not help but try the following to look at the XY plane
with the z axis pointing towards you.

pCamera->SetFocalPoint(0.0, 0.0, 0.0)
pCamera->SetPosition(0.0, 0.0, 1.0)
pCamera->SetViewUp(0.0, 1.0, 0.0)
this->m_Renderer->ResetCamera()
Render()

prabhu



More information about the vtkusers mailing list