[vtkusers] Automatically change radius of sphere when a variable changes its value
ken.martin at kitware.com
Fri Aug 4 10:28:16 EDT 2017
1) actor->SetScale(...) instead of changing the sphere source
2) use a Glyph3DMapper with a scale array to control the scale of each
3) vtkOpenGLSphereMapper with a scale array
Which solution works best depends on the specifics of your use case, ala is
only one sphere changing radius?, are they all?, are they all changing by
the same amount? one actor? 100 actors? etc.
On Fri, Aug 4, 2017 at 10:00 AM, M. Jordan <mjordan at live.at> wrote:
> I have a scene with many spheres (about 100) in my QVTK-Widget.
> Now I would like to achieve that the radii of the spheres change
> automatically when a variable changes its value.
> Right now I add the spheres to the scene, start a timer and in the timer
> callback I change the radius of the SphereSources depending on the
> variable. Finally, I call qvtkwidget->update(); to update the spheres in
> my scene.
> It works, but i would like to improve the speed. Any ideas how to update
> spheres faster? Is there any possibility to only "re-render" one sphere and
> not the whole scene?
> Thank you!
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
Ken Martin PhD
28 Corporate Drive
Clifton Park NY 12065
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers