[vtkusers] vtkassembly

Bill Lorensen bill.lorensen at gmail.com
Mon Sep 6 13:47:39 EDT 2010


The "Part" can be an Assembly or an Actor (and subclass of Prop3D).
Think of the Actors as leafs and the Assemblies as nodes in the
hierarchy.

So something like:
vtkAssembly body
vtkAssembly leftArmJoint
vtkAssembly leftWristJoint
vtkActor leftArm
vtkActor leftWrist

body AddPart(leftArmJoint)
leftArmJoint AddPart(leftArm)
leftArmJoint AddPart(leftWristJoint)
leftWristJoint AddPart(leftWrist)

At least this is how I recall it works,

Bill

On Mon, Sep 6, 2010 at 7:46 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Mon, Sep 6, 2010 at 3:42 AM, Denis Martin <dm at wicam.com> wrote:
>> Dear VTK users,
>>
>>
>>
>> i need some sample or explanation about using of vtkassembly.
>>
>> Even some sample or explanation about parent- child vtkobject.
>>
>>
>>
>> If somebody can help.
>>
>>
>>
>> Thank you
>
> The documentation says "create hierarchies of vtkProp3Ds" but the only
> thing I see to do is AddPart which seems to just make a collection,
> not a hierarchy.
>
> All of the examples simply show:
>
> assembly = vtk.vtkAssembly()
> assembly.AddPart(cylinderActor)
> assembly.AddPart(sphereActor)
>
> Can anyone explain how this is a hierarchy? I would expect to see
> something like:
>
> body = vtk.vtkAssembly()
> arm = body.AddPart(armActor)
> hand = arm.AddPart(bodyActor)
>
> or something like that?
>
> David
> _______________________________________________
> Powered by 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list