[vtkusers] Modifying vtkPolyData
David Doria
daviddoria+vtk at gmail.com
Sun Feb 28 13:33:56 EST 2010
>
>
> Gah! This is wrong. That is not the way do things. You should start
> with the same input each time, and just have some "distance" parameter
> that changes each time.
>
> In VTK, you should always keep the basic pipeline structure intact
> whenever possible.
>
> This is also about understanding how animation is done. Animation is
> not done by "moving all the vertices from the previous position, to
> the current position". Or at least that isn't how it is done in
> serious software.
>
> Animation is done by defining a "path" for each of the object that you
> want to animate. For rigid objects, the "path" is defined by the
> position and orientation of the object at each point in time. For
> non-rigid objects, you will use a larger number of parameters than
> just position/orientation. For your example, computing the position
> is trivial.
>
> To animate an object, you look at the path and say "at time 't', the
> object will be at position 'p'" and then you draw the object at that
> position. By doing animation this way, you can easily do things like
> draw an object with more detail when it is closer to the camera.
>
> So please, please, please change the example.
>
Gotcha. All fixed:
http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimation
And here is how to do it by subclassing vtkCommand:
http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimationSubclass
Thanks for getting these back on track, David G. This is why we need these
examples :)
Jordi - hopefully you will have a pleasant surprise next time you check your
email with all of this discussion :)
David D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100228/e2928d75/attachment.htm>
More information about the vtkusers
mailing list