[vtkusers] deriving my own class from vtkActor
malcolm at geovision.co.za
Sun Oct 20 13:40:51 EDT 2002
Something like ...
vtkActorCollection *actors = vtkRenderer->GetActors() ;
for (actors->InitTraversal();actor = ((vtkMyNewActor*)(actors->GetNextActor()));)
// etc etc
... but there are much safer ways of casting available now. There should be something on dynamic and static casting in your compiler help system.
----- Original Message -----
From: Steffen Oeltze
To: Malcolm Drummond ; VTK users
Sent: Sunday, October 20, 2002 2:43 PM
Subject: Re: [vtkusers] deriving my own class from vtkActor
Malcolm Drummond wrote:
Hi SteffenTry casting to your type of actor - the actor collection contains pointersto type vtkActor.
Unfortunately, I'm not very familiar with C. How does casting work ? What is the syntax ?
Malcolm----- Original Message -----From: "Steffen Oeltze" mailto:<Steffen.Oeltze at Student.Uni-Magdeburg.DETo: "VTK users" mailto:<vtkusers at public.kitware.comSent: Saturday, October 19, 2002 6:05 PMSubject: [vtkusers] deriving my own class from vtkActor
Dear VTK-users,I have derived my own class from vtkActor and I have added a couple ofmethods to this new class.After creating and modifying such a new actor I add it to my existingrenderer. At some point I usevtkRenderer->GetActors() to retrieve my custom actors. Then, I wouldlike to traverse the returnedlist and apply a custom method to each of my selfmade actors. However, Iget the error:
'method' : is not an element of 'vtkActor'
I guess this is a problem of backward compatibility but I don't know howto solve it. Can anybody help me ?Steffen_______________________________________________This is the private VTK discussion list.Please keep messages on-topic. Check the FAQ at:
Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers
_______________________________________________This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers