OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkInteractorStyleTrackballCamera.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkInteractorStyleTrackballCamera.h,v $
5   Language:  C++
6   Date:      $Date: 2003/01/08 17:26:58 $
7   Version:   $Revision: 1.16 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkInteractorStyleTrackballCamera - interactive manipulation of the camera
19 // .SECTION Description
20 // vtkInteractorStyleTrackballCamera allows the user to interactively
21 // manipulate (rotate, pan, etc.) the camera, the viewpoint of the scene.  In
22 // trackball interaction, the magnitude of the mouse motion is proportional
23 // to the camera motion associated with a particular mouse binding. For
24 // example, small left-button motions cause small changes in the rotation of
25 // the camera around its focal point. For a 3-button mouse, the left button
26 // is for rotation, the right button for zooming, the middle button for
27 // panning, and ctrl + left button for spinning.  (With fewer mouse buttons,
28 // ctrl + shift + left button is for zooming, and shift + left button is for
29 // panning.)
30
31 // .SECTION See Also
32 // vtkInteractorStyleTrackballActor vtkInteractorStyleJoystickCamera
33 // vtkInteractorStyleJoystickActor
34
35 #ifndef __vtkInteractorStyleTrackballCamera_h
36 #define __vtkInteractorStyleTrackballCamera_h
37
38 #include "vtkInteractorStyle.h"
39
40 class VTK_RENDERING_EXPORT vtkInteractorStyleTrackballCamera : public vtkInteractorStyle
41 {
42 public:
43   static vtkInteractorStyleTrackballCamera *New();
44   vtkTypeRevisionMacro(vtkInteractorStyleTrackballCamera,vtkInteractorStyle);
45   void PrintSelf(ostream& os, vtkIndent indent);
46
47   // Description:
48   // Event bindings controlling the effects of pressing mouse buttons
49   // or moving the mouse.
50   virtual void OnMouseMove();
51   virtual void OnLeftButtonDown();
52   virtual void OnLeftButtonUp();
53   virtual void OnMiddleButtonDown();
54   virtual void OnMiddleButtonUp();
55   virtual void OnRightButtonDown();
56   virtual void OnRightButtonUp();
57
58   // These methods for the different interactions in different modes
59   // are overridden in subclasses to perform the correct motion. Since
60   // they are called by OnTimer, they do not have mouse coord parameters
61   // (use interactor's GetEventPosition and GetLastEventPosition)
62   virtual void Rotate();
63   virtual void Spin();
64   virtual void Pan();
65   virtual void Dolly();
66   
67 protected:
68   vtkInteractorStyleTrackballCamera();
69   ~vtkInteractorStyleTrackballCamera();
70
71   float MotionFactor;
72
73 private:
74   vtkInteractorStyleTrackballCamera(const vtkInteractorStyleTrackballCamera&);  // Not implemented.
75   void operator=(const vtkInteractorStyleTrackballCamera&);  // Not implemented.
76 };
77
78 #endif