[vtkusers] errors while trying to subclass vtkInteractorStyle

Matt Schmiermund matt at plasticflow.com
Thu May 27 11:39:30 EDT 2004


I am trying to change the behavior of some of the
keypresses and mouse clicks in the vtk window.  So I
am attemptign to subclass vtkInteractorStyle, but I am
running into some errors. I searched google and the
archive but I didn't see anything similar to this. I
looked at the other included interactor styles and
determined there are some macros that need to be
called and I think I have done that correctly.

The first couple of lines from my .h files are:

#include "vtkInteractorStyle.h"

class  VTK_RENDERING_EXPORT myInteractorStyle : public
vtkInteractorStyle
{
    
public:
    static myInteractorStyle *New();
    vtkTypeRevisionMacro( myInteractorStyle,
vtkInteractorStyle );


And in my .cpp file I have:

01 #include "myInteractorStyle.h"
02 #include "vtkRenderWindowInteractor.h"
03
04 vtkCxxRevisionMacro( myInteractorStyle, "$Revision:
1.0 $");
05 vtkStandardNewMacro( myInteractorStyle );


When I attempt to compile this I get:

Error E2090 myInteractorSyle.cpp 5: Qualifier
'vtkObjectFactory' is not a class
or namespace name in function myInteractorStyle::New()
Error E2141 myInteractorSyle.cpp 5: Declaration syntax
error in function myInteractorStyle::New()


I don't have any clue what to make of the above error
messages so if anyone has any idea as to what I am
doing wrong I would appreciate the help.

-Matt Schmiermund



More information about the vtkusers mailing list