[vtkusers] subclassing vtkInteractorStyleTrackballCamera

osch mbraeunlein at gmail.com
Thu Jun 11 12:07:11 EDT 2015


Hi,

i am working on a project based on vtk and qt. So far i am able to render my
3d model. Next step is to interact with it. I want to use a custom
vtkInteractor for this and found an example on how to subclass
vtkInteractorStyleTrackballCamera.
http://www.vtk.org/Wiki/VTK/Examples/Interaction/MouseEvents

So i copied the MouseInteractorStyle4 class into MouseInteractorStyle4.cxx,
leaving out the main method.
I imported MouseInteractorStyle4.cxx into my project and tried the following
code

vtkSmartPointer<MouseInteractorStyle4> customStyle =
vtkSmartPointer<MouseInteractorStyle4>::New();

I get this error message
/home/michael/Documents/project/src/MainApp.cpp:-1: error: multiple
definition of `MouseInteractorStyle4::New()'

What am i doing wrong? Any help is appreciated.
Thanks,
Michael



--
View this message in context: http://vtk.1045678.n5.nabble.com/subclassing-vtkInteractorStyleTrackballCamera-tp5732294.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list