[vtkusers] deriving my own class from vtkActor
Charl P. Botha
c.p.botha at its.tudelft.nl
Wed Oct 9 09:48:53 EDT 2002
On Wed, 2002-10-09 at 15:29, Jerome, Ron wrote:
> I ran into the same problem, I derived my class from vtkOpenGLActor instead
> and it worked fine.
As far is I know, this is not The Right Way(tm) if you want to add
functionality in a generic fashion. This would mean that your class can
only work on OpenGL targets. A better way would be to derive from
vtkActor and also CONTAIN an instance of vtkActor as member that can be
used to perform rendering. The contained vtkActor will specialise (due
to the object factories) as per usual.
> Ron Jerome
> Institute for Chemical Process and
> Environmental Technology
> National Research Council Canada
> 613-993-5346
>
>
> >-----Original Message-----
> >From: Steffen Oeltze [mailto:Steffen.Oeltze at Student.Uni-Magdeburg.DE]
> >Sent: Wednesday, October 09, 2002 6:00 AM
> >To: Vtkusers (E-mail)
> >Subject: [vtkusers] deriving my own class from vtkActor
> >
> >
> >Dear VTK-users,
> >
> >I have tried to derive my own class from vtkActor using the following
> >code:
> >
> >class FIB_TRACK : public vtkActor
> >{
> >public:
> > FIB_TRACK(double [3], double [3], bool);
> > ~FIB_TRACK();
> >....
> >}
> >
> >For creating a new object I use:
> >
> >FIB_TRACK *newAct = new FIB_TRACK(seedpoint, dims, true);
> >
> >Then, I construct the rendering pipeline, add the actor to the
> >renderer and render the window but nothing happens. Is there
> >anyone who can help me ?
> >
> >Regards,
> >Steffen
> >_______________________________________________
> >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
> >
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list