VTK
vtkAbstractPropPicker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractPropPicker.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
63 #ifndef __vtkAbstractPropPicker_h
64 #define __vtkAbstractPropPicker_h
65 
66 #include "vtkAbstractPicker.h"
67 
68 class vtkProp;
69 class vtkPropAssembly;
70 class vtkAssembly;
71 class vtkActor;
72 class vtkVolume;
73 class vtkProp3D;
74 class vtkAssemblyPath;
75 class vtkActor2D;
76 
78 {
79 public:
81  void PrintSelf(ostream& os, vtkIndent indent);
82 
84 
91  virtual void SetPath(vtkAssemblyPath*);
92  vtkGetObjectMacro(Path,vtkAssemblyPath);
94 
95  // The following are convenience methods to maintain API with older
96  // versions of VTK, and to allow query for the return type of a pick. Note:
97  // the functionality of these methods can also be obtained by using the
98  // returned vtkAssemblyPath and using the IsA() to determine type.
99 
102  virtual vtkProp* GetViewProp();
103 
106  virtual vtkProp3D *GetProp3D();
107 
110  virtual vtkActor *GetActor();
111 
114  virtual vtkActor2D *GetActor2D();
115 
118  virtual vtkVolume *GetVolume();
119 
125  virtual vtkAssembly *GetAssembly();
126 
132  virtual vtkPropAssembly *GetPropAssembly();
133 
134 // Disable warnings about qualifiers on return types.
135 #if defined(_COMPILER_VERSION)
136 # pragma set woff 3303
137 #endif
138 #if defined(__INTEL_COMPILER)
139 # pragma warning (push)
140 # pragma warning (disable:858)
141 #endif
142 
143 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
144 # define GetPropA GetProp
145 # define GetPropW GetProp
146 #endif
147 
150  VTK_LEGACY(virtual vtkProp* GetProp());
151 
152 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
153 # undef GetPropW
154 # undef GetPropA
155  //BTX
156  VTK_LEGACY(virtual vtkProp* GetPropA());
157  VTK_LEGACY(virtual vtkProp* GetPropW());
158  //ETX
159 #endif
160 
161 // Reset disabled warning about qualifiers on return types.
162 #if defined(__INTEL_COMPILER)
163 # pragma warning (pop)
164 #endif
165 #if defined(_COMPILER_VERSION)
166 # pragma reset woff 3303
167 #endif
168 
169 protected:
172 
173  void Initialize();
174 
175  vtkAssemblyPath *Path; //this is what is picked, and includes the prop
176 private:
177  vtkAbstractPropPicker(const vtkAbstractPropPicker&); // Not implemented.
178  void operator=(const vtkAbstractPropPicker&); // Not implemented.
179 };
180 
181 #endif