fw4spl
fwVtkBoxRepresentation.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 /*=========================================================================
8 
9  Program: Visualization Toolkit
10  Module: $RCSfile: vtkBoxRepresentation.h,v $
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20  =========================================================================*/
21 // .NAME vtkBoxRepresentation - a class defining the representation for the vtkBoxWidget2
22 // .SECTION Description
23 // This class is a concrete representation for the vtkBoxWidget2. It
24 // represents a box with seven handles: one on each of the six faces, plus a
25 // center handle. Through interaction with the widget, the box
26 // representation can be arbitrarily positioned in the 3D space.
27 //
28 // To use this representation, you normally use the PlaceWidget() method
29 // to position the widget at a specified region in space.
30 //
31 // .SECTION Caveats
32 // This class, and vtkBoxWidget2, are second generation VTK
33 // widgets. An earlier version of this functionality was defined in the
34 // class vtkBoxWidget.
35 
36 // .SECTION See Also
37 // vtkBoxWidget2 vtkBoxWidget
38 
39 #ifndef __FWRENDERVTK_VTK_FWVTKBOXREPRESENTATION_HPP__
40 #define __FWRENDERVTK_VTK_FWVTKBOXREPRESENTATION_HPP__
41 
42 #include "fwRenderVTK/config.hpp"
43 
44 #include <vtkBoxRepresentation.h>
45 #include <vtkWidgetRepresentation.h>
46 
47 class vtkActor;
48 class vtkPolyDataMapper;
49 class vtkLineSource;
50 class vtkSphereSource;
51 class vtkCellPicker;
52 class vtkProperty;
53 class vtkPolyData;
54 class vtkPoints;
55 class vtkPolyDataAlgorithm;
56 class vtkPointHandleRepresentation3D;
57 class vtkTransform;
58 class vtkPlanes;
59 class vtkBox;
60 class vtkDoubleArray;
61 class vtkMatrix4x4;
62 
63 class FWRENDERVTK_CLASS_API fwVtkBoxRepresentation : public vtkBoxRepresentation
64 {
65 public:
66  // Description:
67  // Instantiate the class.
68  FWRENDERVTK_API static fwVtkBoxRepresentation* New();
69 
70  // Description:
71  // Standard methods for the class.
72  vtkTypeMacro(fwVtkBoxRepresentation, vtkBoxRepresentation);
73  void PrintSelf(ostream& os, vtkIndent indent) override;
74 
75  // Description:
76  // Control the behavior of the widget. Translation, rotation, and
77  // scaling can all be enabled and disabled.
78  vtkSetMacro(TranslationEnabled, int);
79  vtkGetMacro(TranslationEnabled, int);
80  vtkBooleanMacro(TranslationEnabled, int);
81  vtkSetMacro(ScalingEnabled, int);
82  vtkGetMacro(ScalingEnabled, int);
83  vtkBooleanMacro(ScalingEnabled, int);
84  vtkSetMacro(RotationEnabled, int);
85  vtkGetMacro(RotationEnabled, int);
86  vtkBooleanMacro(RotationEnabled, int);
87 
88 // // Description:
89 // // These are methods that satisfy vtkWidgetRepresentation's API.
90  virtual void WidgetInteraction(double e[2]) override;
91 
92 protected:
94 
95  // Control whether scaling, rotation, and translation are supported
96  int TranslationEnabled;
97  int ScalingEnabled;
98  int RotationEnabled;
99 
100 };
101 
102 #endif //__FWRENDERVTK_VTK_FWVTKBOXREPRESENTATION_HPP__