[vtkusers] Automatically change radius of sphere when a variable changes its value

M. Jordan mjordan at live.at
Mon Aug 7 08:30:40 EDT 2017


i tried to use the ->SetScale() options but it turned out that this changes the position as well.
My goal is to find the fastest way to change the radius of the spheres, without affecting their positions.
Any idea how to solve this issue?

Thank you very much!

Von: Ken Martin <ken.martin at kitware.com>
Gesendet: Freitag, 04. August 2017 16:28
An: M. Jordan
Cc: vtkusers at vtk.org
Betreff: Re: [vtkusers] Automatically change radius of sphere when a variable changes its value

1) actor->SetScale(...) instead of changing the sphere source


2) use a Glyph3DMapper with a scale array to control the scale of each sphere


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<mailto: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<http://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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:

Ken Martin PhD
Distinguished Engineer
Kitware Inc.
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...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170807/d5276a95/attachment.html>

More information about the vtkusers mailing list