[vtkusers] Question about vtkActor::Translate

rchqh rchqh at polyu.edu.hk
Tue Jan 14 21:49:34 EST 2003


I finally found a way to show translation of an Actor,though I don't think 
it's a better one.
the method is to firstly use 
vtkRenderer::ResetCamera(xmin,xmax,ymin,ymax,zmin,zmax) each time.and then use 
vtkRenderer::AddActor(a).After that use vtkRenderWindow::Render() to update 
the scene.
It seems that the Actor translated.But I still don't know why translations of 
vtkActor::SetPosition/Addpositon/SetUserMatrix/SetUserTransform didn't work 
without resetting camera.I found it's a little difficult to handle with vtk 
graphic models,since lots of functions are hard to use.
>===== Original Message From "Chunyan Jiang" <jiang at TI.FhG.DE> =====
>I also want to translate an vtkActor. Who can tell me how to do it?
>
>Thanks a lot!
>
>Chunyan
>-----Ursprüngliche Nachricht-----
>Von: vtkusers-admin at public.kitware.com
>[mailto:vtkusers-admin at public.kitware.com]Im Auftrag von rchqh
>Gesendet: Freitag, 10. Januar 2003 08:08
>An: vtkusers
>Betreff: [vtkusers] Question about vtkActor::Translate
>
>
>hi all,
>I am using vtkActor to show images in 3D space.I want to rotate and tranlate
>an Actor by calling SetUserMatrix and AddPosition.
>   actor->SetUserMatrix(mat);
>   actor->AddPosition(x,y,z);
>I found while rotating images this method worked well,but it didn't work
>while
>translating images.Can you tell me why I couldn't translate an Actor using
>Translate function and how to translate an Actor.
>Any help is appreciated.
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list