[vtkusers] intersection of two actors
İlhan Özhamur
ilhanozhamur at gmail.com
Thu Oct 16 04:01:21 EDT 2014
Hi again,
> It sounds like you have three vtkActors, one for two polydata and one
> for the intersection of the polydata.
Yes you are right. We have three vtkActors, two Spheres and one for
intersection of Spheres.
> You don't say how you are moving
> the actors, but I assume you are calling the SetPosition() method on
> the actors to move them.
We move actors with using keyboard interaction. We use TrackballActor.
> If that's the case, it's important to know
> that this translation only affects the apparent position of the
> actors, not the positions of the underlying data. Hence, your
> intersection is not being updated because your polydata objects aren't
> changing.
In this case, does translation only affects apparent postion of the actors?
> Instead, you need to change the actual positions of the polydata with
> a filter such as vtkTransformPolyData. Then the output of
> vtkTransformPolyData should be set as the input to the intersection
> filter (I assume you are using vtkIntersectionPolyDataFilter) and the
> vtkMappers that feed into the actors.
So how can we use vtkTransformPolyData and keyboard interactions together?
> Hope that helps,
> Cory
Thank you for your help.
2014-10-13 18:14 GMT+03:00 Cory Quammen <cory.quammen at kitware.com>:
> It sounds like you have three vtkActors, one for two polydata and one
> for the intersection of the polydata. You don't say how you are moving
> the actors, but I assume you are calling the SetPosition() method on
> the actors to move them. If that's the case, it's important to know
> that this translation only affects the apparent position of the
> actors, not the positions of the underlying data. Hence, your
> intersection is not being updated because your polydata objects aren't
> changing.
>
> Instead, you need to change the actual positions of the polydata with
> a filter such as vtkTransformPolyData. Then the output of
> vtkTransformPolyData should be set as the input to the intersection
> filter (I assume you are using vtkIntersectionPolyDataFilter) and the
> vtkMappers that feed into the actors.
>
> Hope that helps,
> Cory
>
>
> On Mon, Oct 13, 2014 at 8:31 AM, İlhan Özhamur <ilhanozhamur at gmail.com>
> wrote:
> > Hi all,
> >
> > I try to indicate the intersection region of 2 different actors I have
> used
> > poldydata filter to draw the intersection (intersection is a actor too).
> But
> > i couldn't make it dynamic. When i move the actors to different
> positions,
> > intersection actor's initial state remains same. How can i create
> > intersection actor and change it dynamically?
> >
> > Thank you.
> >
> > _______________________________________________
> > 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://public.kitware.com/mailman/listinfo/vtkusers
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141016/7a7647ad/attachment.html>
More information about the vtkusers
mailing list