Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Rendering/vtkInteractorStyleSwitch.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkInteractorStyleSwitch.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00050 #ifndef __vtkInteractorStyleSwitch_h
    00051 #define __vtkInteractorStyleSwitch_h
    00052
    00053 #include "vtkInteractorStyle.h"
    00054
    00055 #define VTKIS_JOYSTICK  0
    00056 #define VTKIS_TRACKBALL 1
    00057
    00058 #define VTKIS_CAMERA    0
    00059 #define VTKIS_ACTOR     1
    00060
    00061 class vtkInteractorStyleJoystickActor;
    00062 class vtkInteractorStyleJoystickCamera;
    00063 class vtkInteractorStyleTrackballActor;
    00064 class vtkInteractorStyleTrackballCamera;
    00065
    00066 class VTK_RENDERING_EXPORT vtkInteractorStyleSwitch : public vtkInteractorStyle
    00067 {
    00068 public:
    00069   static vtkInteractorStyleSwitch *New();
    00070   vtkTypeRevisionMacro(vtkInteractorStyleSwitch, vtkInteractorStyle);
    00071   void PrintSelf(ostream& os, vtkIndent indent);
    00072
    00074   void SetInteractor(vtkRenderWindowInteractor *iren);
    00075
    00078   void SetAutoAdjustCameraClippingRange( int value );
    00079
    00081
    00082   vtkGetObjectMacro(CurrentStyle, vtkInteractorStyle);
    00083   void SetCurrentStyleToJoystickActor();
    00084   void SetCurrentStyleToJoystickCamera();
    00085   void SetCurrentStyleToTrackballActor();
    00086   void SetCurrentStyleToTrackballCamera();
    00088
    00091   virtual void OnChar();
    00092
    00093 protected:
    00094   vtkInteractorStyleSwitch();
    00095   ~vtkInteractorStyleSwitch();
    00096
    00097   void SetCurrentStyle();
    00098
    00099   vtkInteractorStyleJoystickActor *JoystickActor;
    00100   vtkInteractorStyleJoystickCamera *JoystickCamera;
    00101   vtkInteractorStyleTrackballActor *TrackballActor;
    00102   vtkInteractorStyleTrackballCamera *TrackballCamera;
    00103   vtkInteractorStyle* CurrentStyle;
    00104
    00105   int JoystickOrTrackball;
    00106   int CameraOrActor;
    00107
    00108 private:
    00109   vtkInteractorStyleSwitch(const vtkInteractorStyleSwitch&);  // Not implemented.
    00110   void operator=(const vtkInteractorStyleSwitch&);  // Not implemented.
    00111 };
    00112
    00113 #endif