[vtkusers] Modifying actor rotation behaviour

Zamir Khan zkhan at modusmed.com
Fri Dec 18 11:53:00 EST 2009


Upon closer inspection, this widget appears too specific for what I need 
(and I believe the reason I didn't see it was because I wasn't looking 
under Geovis). My "compass" is really more of a dial - it would be 
analogous to an analog speedometer in a car or an analog clock. I need 
to be able to configure the labels that appear around the dial, as well 
as the values that are represented by the arrow positions on the dial. 
Does such a widget exist?

If not, I need to go back to my attempt to build one and my original 
questions (1) and (2) remain.

Zamir Khan wrote:
> Argh! I really thought I had looked through the widgets - I think that
> was before I started calling what I was building a "compass" ;)
>
> Thanks Jeff, I will see if that widget meets my needs.
>
> Jeff Baumes wrote:
> > On Fri, Dec 18, 2009 at 11:11 AM, Zamir Khan <zkhan at modusmed.com> 
> <mailto:zkhan at modusmed.com%3E>
> > <mailto:zkhan at modusmed.com%3E> <mailto:zkhan at modusmed.com%3E%3E> wrote:
> > > Hi,
> > >
> > > I am using VTK to build what is likely best described as a compass
> > control.
> > > A 2-d dial with labels and arrows. Most of the control is fixed in
> > position
> > > (and the camera is fixed to view the X-Y plane only), but I want to
> > allow
> > > the user to rotate the arrows about the center of the compass. Here
> > is where
> > > I am running into problems. I need to:
> > >
> > > 1) Modify the arrow actor such that its rotation occurs about the
> > bottom of
> > > its shaft rather than the center of the actor. However, it appears
> > thus far
> > > that setting the origin of the actor merely moves the actor to another
> > > location in the scene, where it still rotates about its center. Am I
> > > misusing SetOrigin, or is there another way to make an actor rotate
> > about a
> > > point that is not its center, when manipulated by the user?
> > >
> > > 2) Limit the rotation of the actor to stay within the x-y plane. My
> > first
> > > thought is that I'll need to add an event handler to the appropriate
> > > callback for this actor, modifying any rotations to only rotate the
> > object
> > > about the z-axis. Is there a better way? If not, if someone has done
> > > something similar before, what event would you recommend intercepting?
> >
> > I'd suggest you take a look at vtkCompassWidget in VTK/Geovis.
> >
> > Jeff
> > ------------------------------------------------------------------------
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> ------------------------------------------------------------------------
> Total Control Panel 	Login 
> <https://asp-0.reflexion.net/login?domain=modusmed.com>
>
> To: zkhan at modusmed.com 
> <https://asp-0.reflexion.net/address-properties?aID=56147878>
> From: vtkusers-bounces at vtk.org 
> <https://asp-0.reflexion.net/address-properties?aID=56490913>
>
> 	
> Remove 
> <https://asp-0.reflexion.net/FooterAction?ver=1&un-wl-sender-address=1&rID=56147878&aID=56490913> 
> this sender from my allow list
>
> You received this message because the sender is on your allow list.
>



More information about the vtkusers mailing list