[vtkusers] get sphere coordinates after moving

David Doria daviddoria at gmail.com
Wed Jan 12 09:51:55 EST 2011


On Wed, Jan 12, 2011 at 9:39 AM, Jazz Kartell <jazzkartell at gmx.de> wrote:
> hello everybody,
>
> i have multiple sphere actors based on the coodinates from a vtkpoints
> object.
> actually i can move a single sphere around (middle mouse button), but can't
> access the new coordinates.
> i tried some examples dealing with coordinates, but it seems that these
> coordinates are not the ones used to place the spheres at the beginning...
>
> So i need some kind of mapping between the sphere-actors and the underlying
> points in vtkpoints.
> Finally, I want to update the coordinates in the vtkpoints after a
> movement...
> Is that possible?
>
> Best Regards
>
> Benjamin

This example shows how to get the rotation matrix of an actor:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/RotateActor

The procedure is very similar for finding its position- just replace
GetMatrix with GetPosition.

David



More information about the vtkusers mailing list