21 #include "vtkCallbackCommand.h"
22 #include "vtkCommand.h"
23 #include "vtkInteractorStyleJoystickActor.h"
24 #include "vtkInteractorStyleJoystickCamera.h"
25 #include "vtkInteractorStyleTrackballActor.h"
26 #include "vtkInteractorStyleTrackballCamera.h"
27 #include "vtkObjectFactory.h"
28 #include "vtkRenderWindowInteractor.h"
32 class axlInteractorStyleSwitchPrivate
72 if ( value == this->AutoAdjustCameraClippingRange )
77 if ( value < 0 || value > 1 )
79 vtkErrorMacro(
"Value must be between 0 and 1 for" <<
80 " SetAutoAdjustCameraClippingRange");
84 this->AutoAdjustCameraClippingRange = value;
85 this->
JoystickActor->SetAutoAdjustCameraClippingRange( value );
128 switch (this->Interactor->GetKeyCode())
133 this->EventCallbackCommand->SetAbortFlag(1);
138 this->EventCallbackCommand->SetAbortFlag(1);
143 this->EventCallbackCommand->SetAbortFlag(1);
148 this->EventCallbackCommand->SetAbortFlag(1);
226 if(iren == this->Interactor)
233 this->Interactor->RemoveObserver(this->EventCallbackCommand);
235 this->Interactor = iren;
239 iren->AddObserver(vtkCommand::CharEvent,
240 this->EventCallbackCommand,
243 iren->AddObserver(vtkCommand::DeleteEvent,
244 this->EventCallbackCommand,
253 this->Superclass::PrintSelf(os,indent);
254 os << indent <<
"CurrentStyle " << this->
CurrentStyle <<
"\n";
255 if (this->CurrentStyle)
257 vtkIndent next_indent = indent.GetNextIndent();
258 os << next_indent << this->CurrentStyle->GetClassName() <<
"\n";
259 this->CurrentStyle->PrintSelf(os, indent.GetNextIndent());
266 this->vtkInteractorStyle::SetDefaultRenderer(renderer);
276 this->vtkInteractorStyle::SetCurrentRenderer(renderer);
~axlInteractorStyleSwitch()
vtkInteractorStyleJoystickCamera * JoystickCamera
void SetCurrentStyleToTrackballActor()
vtkInteractorStyleTrackballActor * TrackballActor
void SetAutoAdjustCameraClippingRange(int value) override
vtkInteractorStyleJoystickActor * JoystickActor
void SetInteractor(vtkRenderWindowInteractor *iren)
virtual void SetCurrentRenderer(vtkRenderer *) override
vtkInteractorStyleTrackballCamera * TrackballCamera
vtkInteractorStyle * CurrentStyle
axlInteractorStyleSwitch(QObject *parent=0)
void SetCurrentStyleToJoystickActor()
vtkStandardNewMacro(axlInteractorStyleSwitch)
virtual void SetDefaultRenderer(vtkRenderer *) override
void SetCurrentStyleToJoystickCamera()
void SetCurrentStyleToTrackballCamera()
void PrintSelf(ostream &os, vtkIndent indent)