[vtkusers] Instantiation of an InteractorStyle subclass

Lonni Besançon lonni.besancon at gmail.com
Tue Oct 27 09:51:54 EDT 2015


Hello everyone,

While simply trying to re-write one of the classes used in an example code
of VTK , I decided to subclass vtkInteractorStyle in order to re-create a
class very similar to vtkInteractorStyleTrackballCamera. Therefore I decide
to copy/paste the implementation of vtkInteractorStyleTrackballCamera.

However, I noticed in this code that the New() method is not implemented in
the .cxx file yet the example seems to work just fine. But when I try to
re-create it with my own version of the trackballcamera I get a Linking
error on the new method of my own subclass.

I therefore have two questions:

How come the implementation of the New() method is not in the .cxx file?
How come when I try to do the exact same thing (just copying/pasting and
changing names) it does not work?
I am at a loss about these two 'issues'. Hope you can help me figure them
out.

If you'd rather answer on StackOverflow I created a post  there
<http://stackoverflow.com/questions/33369693/new-implementation-with-vtk-and-subclass>  
so you can get rep for your answer.

Thanks in advance,




--
View this message in context: http://vtk.1045678.n5.nabble.com/Instantiation-of-an-InteractorStyle-subclass-tp5734624.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list