[vtkusers] How do I move multiple actors on the same window?

Taro Trabish tarotrabish at hotmail.com
Sat Oct 21 16:09:12 EDT 2006


Thanks Wes,
I was able to get the 'a' to work to manipulate the actors independently... very cool.  I need to look into this more but I could not get the actors to move around.  I guess I need to implement some kinda of transformation.  Basically I want to drag actors around on the screen using the mouse.  What's the easiest way to go about doing that?
 
Taro


Date: Fri, 20 Oct 2006 14:45:37 -0400From: wes.turner at kitware.comTo: tarotrabish at hotmail.comSubject: Re: [vtkusers] How do I move multiple actors on the same window?Taro,I'm cc'ing this back to the vtkusers list.  They have a searchable archive for this list, and you get more help should I state something incorrectly.If you are using the default interactor, you just need to press 'a' then place the mouse over the actor and interact with it the same way as you would the camera.  So left mouse button rotates, middle pans, and right zooms. You can use the same renderer and same interactor.  You need separate actors.  I think the afterimage can be destroyed by doing an update, or telling the renderer to render on startup.  Take a look at VTK\Examples\Rendering\Cxx\DiffuseSpheres.cxx for an easy example of how to do what you want. - Wes
On 10/20/06, Taro Trabish <tarotrabish at hotmail.com> wrote:

 I believe I did that and 'a' or 'c' dont seem to be do anything different. 'p' puts a nice red selection box around the actor. Do I need to implement some code to enabled it.  So if all things are setup correctly should I be able to put the mouse over the actor, press 'a' and then use the mouse to drag the actor around, leaving the other actors in place?  So for my needs, should I have a separate renderer  and interactor for each actor to can I make all actors use the same renderer/interactor? Also, another separete problem is how do I clear the window on startup.. I seem to get the last image that was displayed every time I start. Thanks for your help...I ordered the new VTK books from kitware which should be arriving sometime today. ThanksTaro


Date: Fri, 20 Oct 2006 09:11:51 -0400From: wes.turner at kitware.comTo: tarotrabish at hotmail.comSubject: Re: [vtkusers] How do I move multiple actors on the same window?CC: vtkusers at vtk.org 
Taro,The default interaction mode for VTK is to move the camera not the actors, which makes it appear that all the actors move simultaneously.  To actually interact with the actors, I believe you need to hit the 'a' key (I also believe returning to camera interaction requires that you hit the 'c' key). - Wes
On 10/20/06, Taro Trabish <tarotrabish at hotmail.com> wrote: 

 Hello, Please forgive me if my questions are very basic.  I just started using VTK for my project and I was able to get multiple actors to show up in a single window. I'm using the .NET wrappers of VTK and programming in C#.  I want to be able to have multiple actors in the same window and be able to use the mouse to drag them individually around, sometimes such that they overlap/intersect each other. Right now, all my actors move at the same time.  I've tried the ren.SetViewport( ) method but that gives each actor a "space" in the main window.  I want all actors to share the entire view so that I can move actors around and have them touch each other if I want.  I also don't want to disturb the scale of the actors.  E.g. if I use the right button to zoom in, I want all actors to zoom together and not just the selected one but "move" and "rotate" should be independent for each actor.  I would be very grateful if somebody can help me or point me to some example code that has something similar. I'm very confused if I should have a renderer/interactor for each actor and how I should manage them in the render window.  ThanksTaro_______________________________________________This is the private VTK discussion list.Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQFollow this link to subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers -- Wesley D. Turner, Ph.D.R&D Engineer28 Corporate DriveClifton Park, NY 12065-8662Phone: 518-371-6971 x120 -- Wesley D. Turner, Ph.D.R&D Engineer28 Corporate DriveClifton Park, NY 12065-8662Phone: 518-371-6971 x120 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061021/05661d12/attachment.htm>


More information about the vtkusers mailing list