[vtkusers] Visualize a box of several identical models
David Doria
daviddoria at gmail.com
Sun Oct 31 17:37:35 EDT 2010
On Sun, Oct 31, 2010 at 1:45 PM, Christian Lohr
<aequinoktikum at googlemail.com> wrote:
> Hi,
> I want to construct a box of identical models. The models have the
> disadvantage, that they are very detailed, so I used a LOD-Technique
> from VTK (vtkQuadricsActor). But I'm still not satisfied, because when
> I generate a large box with a lot of models, the application freezes
> for a certain time. The main problem occurs when I stop moving the
> object with my mouse and then it switches to the full detailed
> representation.(Application is not responding for a couple of seconds)
>
> I already wrote/copied some code together doing this job as I said.
> I used the class vtkSTLReader to import the model. They are appended
> to vtkAppendPolyData(but first transformed via vtkTransformFilter)
>
> Because I'm new to VTK, it would be interesting to know, if there's a
> better method to do this.
>
> I appended my source code and a picture of who it looks like(and should).
>
> Sincerely yours,
>
> Christian Lohr
>
If you want all of these models to be identical, you should create
several actors for the one mapper and apply the transformations to the
actors. This is instead of copying the actual data of the model and
appending them together with vtkAppendPolyData.
See slide 8 here:
https://docs.google.com/present/edit?id=0AcyIfGqnlfSoZGdqaGhnMnJfMjY1aGJqZGZ4ZnQ&hl=en
(from presentation 2 (Transformations) here:
http://www.vtk.org/Wiki/VTK/Presentations)
Good luck.
David
More information about the vtkusers
mailing list