[vtkusers] what's the difference between actor 's position and sphere 's center ?
Jochen K.
jochen.kling at email.de
Mon Jun 4 15:49:49 EDT 2012
Hi Yeonchool,
it's not necessary to recreate your source object to modify any property.
It's always allowed to modify the source whenever it's needed.
This said, you can call e.g. sphereSource->SetRadius(newValue) without
recreating everything from scratch as long as your object sphereSource is
still alive.
The same is true when applying a filter. There's not need to retrieve the
sourceobject from the actor reversely to apply any modification.
Just apply your filter to your sphereSource exactly like shown in your code
snippet at the end your last post.
It might be necessary to call mapper->Modified() or mapper->Update(), I'm
always a little bit confused when to call it and when not. ;-)
I would go for alternative 3.
Alternative 1 is neither the recommended way, nor necessary.
Alternative 2 can work, but keep in mind that the coordinates are _not_
changed while moving your actor around with SetPosition().
What I really would do in such a case, I would write a tiny application to
test it. In your case I would create one actor, whose source is a
vtkSphereSource.
Then I would try to find a sophisticate solution.
Another advantage is that the sourcecode can be shown here and others can
reproduce your problem more easily.
with best regards
Jochen
--
View this message in context: http://vtk.1045678.n5.nabble.com/what-s-the-difference-between-actor-s-position-and-sphere-s-center-tp5713553p5713577.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120604/5590305e/attachment.htm>
More information about the vtkusers
mailing list