[vtkusers] Camera doubt

vaibhav agarwal vaibhav_19842002 at yahoo.co.in
Mon Feb 26 18:23:29 EST 2007


Hi, 

I rendered a 3d image. With the mouse interaction it
rotates (I followed the Medical1.tcl example).
Now I wrote a fuction to set the camera in a
direction. When i call this function it shows the
image from a certain direction. Now with the mouse i
rotate the 3d image. Again call this function, but to
my wonders the image is now set in diff direction than
it set in previous case.
[45 50 100] to [48 52 105] can be only one direction.
How it comes different??

proc push_button {} {
   aCamera SetClippingRange 0.2 90
   aCamera SetFocalPoint 48 52 105
   aCamera SetPosition 45 50 100
   aCamera OrthogonalizeViewUp
   aRenderer ResetCamera
   iren Render
}

-------------
2nd doubt...

When i use flyto from vtkRenderWindowInteractor Class,
again i designed a push button function...
proc push_button {} {
   iren FlyTo aRenderer 20 1 1
   iren Render
}

I call the function again and again and it keeps
zooming.. why ?? 

definition says "Given a position x, move the current
camera's focal point to x. The movement is animated
over the number of frames specified in
NumberOfFlyFrames. The LOD desired frame rate is
used."

hasn't it's focal point reached to the point i had
passed??
----------
After flyto if i change the direction using the first
push_button fuction, all the zoom i got by flyto
disappears. Now my actual job is to make camera follow
a path (non linear), so i am bound to change my
direction but if all the zoom disappers suddenly as i
change direction according to next co-ordinate and i
again fly to the next cordinate and get the zoom, its
a very awkword condition for me.

Any kind of help is appretiated for my messed up
condition :)

vaibhav


 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com



More information about the vtkusers mailing list