<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Steffen</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Something like ...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkActorCollection *actors =
vtkRenderer->GetActors() ;</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkMyNewActor *actor;</FONT></DIV>
<DIV><FONT face=Arial size=2>for (actors->InitTraversal();actor =
((vtkMyNewActor*)(actors->GetNextActor()));)</FONT></DIV>
<DIV><FONT face=Arial size=2> {</FONT></DIV>
<DIV><FONT face=Arial size=2>
actor->MyExtendedMethod();</FONT></DIV>
<DIV><FONT face=Arial size=2> // etc etc</FONT></DIV>
<DIV><FONT face=Arial size=2> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>... but there are much safer ways of casting
available now. There should be something on dynamic and static casting in
your compiler help system.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Malcolm</FONT></DIV>
<DIV> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE"
title=Steffen.Oeltze@Student.Uni-Magdeburg.DE>Steffen Oeltze</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:malcolm@geovision.co.za" title=malcolm@geovision.co.za>Malcolm
Drummond</A> ; <A href="mailto:vtkusers@public.kitware.com"
title=vtkusers@public.kitware.com>VTK users</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, October 20, 2002 2:43
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vtkusers] deriving my own
class from vtkActor</DIV>
<DIV><BR></DIV><BR>Malcolm Drummond wrote:<BR>
<BLOCKQUOTE type="cite" cite="mid:000901c27827$e5a3a540$718cfea9@maggie"><PRE wrap="">Hi Steffen<BR><BR>Try casting to your type of actor - the actor collection contains pointers<BR>to type vtkActor.</PRE></BLOCKQUOTE>Unfortunately,
I'm not very familiar with C. How does casting work ? What is the syntax
?<BR><BR>Steffen<BR><BR>
<BLOCKQUOTE type="cite" cite="mid:000901c27827$e5a3a540$718cfea9@maggie"><PRE wrap=""><BR><BR>Malcolm<BR><BR>----- Original Message -----<BR>From: "Steffen Oeltze" <A class=moz-txt-link-rfc2396E href="mailto:<Steffen.Oeltze@Student.Uni-Magdeburg.DE">mailto:<Steffen.Oeltze@Student.Uni-Magdeburg.DE</A><BR>To: "VTK users" <A class=moz-txt-link-rfc2396E href="mailto:<vtkusers@public.kitware.com">mailto:<vtkusers@public.kitware.com</A><BR>Sent: Saturday, October 19, 2002 6:05 PM<BR>Subject: [vtkusers] deriving my own class from vtkActor<BR><BR><BR></PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Dear VTK-users,<BR><BR>I have derived my own class from vtkActor and I have added a couple of<BR>methods to this new class.<BR>After creating and modifying such a new actor I add it to my existing<BR>renderer. At some point I use<BR>vtkRenderer->GetActors() to retrieve my custom actors. Then, I would<BR>like to traverse the returned<BR>list and apply a custom method to each of my selfmade actors. However, I<BR>get the error:<BR><BR></PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">'method' : is not an element of 'vtkActor'<BR></PRE></BLOCKQUOTE><PRE wrap="">I guess this is a problem of backward compatibility but I don't know how<BR>to solve it. Can anybody help me ?<BR><BR>Steffen<BR><BR><BR>_______________________________________________<BR>This is the private VTK discussion list.<BR>Please keep messages on-topic. Check the FAQ at:<BR></PRE></BLOCKQUOTE><PRE wrap=""><!----><A class=moz-txt-link-rfc2396E href="http://public.kitware.com/cgi-bin/vtkfaq"><http://public.kitware.com/cgi-bin/vtkfaq></A><BR></PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Follow this link to subscribe/unsubscribe:<BR><A class=moz-txt-link-freetext href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</A><BR><BR><BR></PRE></BLOCKQUOTE><PRE wrap=""><!----><BR><BR>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: <A class=moz-txt-link-rfc2396E href="http://public.kitware.com/cgi-bin/vtkfaq"><http://public.kitware.com/cgi-bin/vtkfaq></A><BR>Follow this link to subscribe/unsubscribe:<BR><A class=moz-txt-link-freetext href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</A><BR><BR></PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>