[vtkusers] Adding a vtkAssembly onto another vtkAssembly? Is this possible?
Student Life
lifestudent37 at gmail.com
Fri Jan 16 18:50:23 EST 2015
Dear David,
Thanks for your response.
Yes, turns out you can add one vtkAssembly to another.
Now, the question really is how can one store multiple copies/instances of
vtkAssembly's?
If the number of possible vtkAssembly's were known, I would have opted for
a fixed size array, however I can only think of the C++ Vector.
This is what I can think of as a data structure...
*vector<vtkAssembly> actorCombo*
Are there better data structures for handling multiple vtkAssembly's?
Also, I am having some difficulty storing multiple glyph's that are plotted
on a vtkActor. Basically, I can store vtkActor's as *vector<vtkActor>
actors*
but I don't know how to store and associate the multiple glyph's to each
actor. If I were to use C Style arrays, I could opt for a 2D array, such
that [i][j], where [i] would represent the index of the actor and [j] would
represent each glyph object. How would I go about storing it as a vector?
Also, in terms of memory management, what is better - linked lists or
vectors?
Would greatly appreciate it if you or anyone on this forum could answer my
questions. It would really mean a lot to me.
Many Thanks
On Thu, Jan 15, 2015 at 1:52 PM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Jan 14, 2015 at 6:02 AM, Student Life <lifestudent37 at gmail.com>
> wrote:
>
>> Hi,
>>
>> Basically, I want to store a vtkActor as well as any picked points on the
>> actor into an assembly.
>>
>> I then want to add this assembly onto a new assembly
>>
>> Is this possible in vtk?
>>
>
> Typically, the first thing you could do is try it and see if it works. In
> this case, it looks like it should, because vtkAssembly is derived from
> vtkProp3D, and the AddPart function takes a vtkProp3D*:
>
> void vtkAssembly::AddPart(vtkProp3D *)
>
> http://www.vtk.org/doc/nightly/html/classvtkAssembly.html
>
> David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150116/28196fd5/attachment.html>
More information about the vtkusers
mailing list