[vtkusers] How to subclass vtkInteractorStyle?

a.meijster at rc.rug.nl a.meijster at rc.rug.nl
Sun Feb 8 13:51:22 EST 2004


Hi,

I want to make a subclass of vtkInteractorStyle in
order to build my own interactor. 

I tried:

class myInteractorStyle : public vtkInteractorStyle {
	// for the time being this is empty
};

The compiler (g++) accepts this, but when I try to make
an object with

  myInteractorStyle *style = myInteractorStyle::New();

the compiler generates the following error:
  invalid conversion from `vtkInteractorStyle*' to 
   myInteractorStyle*'

What am I doing wrong? Can anybody give me an example 
how to make subclasses of vtkInteractorStyle? Just a 
simple example which only prints to the terminal 
that a mouse button was clicked would be perfect. 
>From that point on I think I'll manage myself.

Regards,

  Arnold


========================================================
Arnold Meijster
Centre for High Performance Computing & Visualisation,
Nettelbosje 1,
9747 AJ Groningen, Netherlands

e-mail: a.meijster at rc.rug.nl
tel:    +31 50 363 9246



More information about the vtkusers mailing list