00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAbstractPropPicker.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00063 #ifndef __vtkAbstractPropPicker_h 00064 #define __vtkAbstractPropPicker_h 00065 00066 #include "vtkAbstractPicker.h" 00067 00068 class vtkProp; 00069 class vtkPropAssembly; 00070 class vtkAssembly; 00071 class vtkActor; 00072 class vtkVolume; 00073 class vtkProp3D; 00074 class vtkAssemblyPath; 00075 class vtkActor2D; 00076 00077 class VTK_RENDERING_EXPORT vtkAbstractPropPicker : public vtkAbstractPicker 00078 { 00079 public: 00080 vtkTypeRevisionMacro(vtkAbstractPropPicker,vtkAbstractPicker); 00081 void PrintSelf(ostream& os, vtkIndent indent); 00082 00084 00091 virtual void SetPath(vtkAssemblyPath*); 00092 vtkGetObjectMacro(Path,vtkAssemblyPath); 00094 00095 // The following are convenience methods to maintain API with older 00096 // versions of VTK, and to allow query for the return type of a pick. Note: 00097 // the functionality of these methods can also be obtained by using the 00098 // returned vtkAssemblyPath and using the IsA() to determine type. 00099 00102 virtual vtkProp* GetViewProp(); 00103 00106 virtual vtkProp3D *GetProp3D(); 00107 00110 virtual vtkActor *GetActor(); 00111 00114 virtual vtkActor2D *GetActor2D(); 00115 00118 virtual vtkVolume *GetVolume(); 00119 00125 virtual vtkAssembly *GetAssembly(); 00126 00132 virtual vtkPropAssembly *GetPropAssembly(); 00133 00134 // Disable warnings about qualifiers on return types. 00135 #if defined(_COMPILER_VERSION) 00136 # pragma set woff 3303 00137 #endif 00138 #if defined(__INTEL_COMPILER) 00139 # pragma warning (push) 00140 # pragma warning (disable:858) 00141 #endif 00142 00143 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE 00144 # define GetPropA GetProp 00145 # define GetPropW GetProp 00146 #endif 00147 00150 VTK_LEGACY(virtual vtkProp* const GetProp()); 00151 00152 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE 00153 # undef GetPropW 00154 # undef GetPropA 00155 //BTX 00156 VTK_LEGACY(virtual vtkProp* const GetPropA()); 00157 VTK_LEGACY(virtual vtkProp* const GetPropW()); 00158 //ETX 00159 #endif 00160 00161 // Reset disabled warning about qualifiers on return types. 00162 #if defined(__INTEL_COMPILER) 00163 # pragma warning (pop) 00164 #endif 00165 #if defined(_COMPILER_VERSION) 00166 # pragma reset woff 3303 00167 #endif 00168 00169 protected: 00170 vtkAbstractPropPicker(); 00171 ~vtkAbstractPropPicker(); 00172 00173 void Initialize(); 00174 00175 vtkAssemblyPath *Path; //this is what is picked, and includes the prop 00176 private: 00177 vtkAbstractPropPicker(const vtkAbstractPropPicker&); // Not implemented. 00178 void operator=(const vtkAbstractPropPicker&); // Not implemented. 00179 }; 00180 00181 #endif