VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkPickingManager.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPickingManager.h
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 =========================================================================*/
00015 
00016 /*==============================================================================
00017 
00018   Library: MSVTK
00019 
00020   Copyright (c) Kitware Inc.
00021 
00022   Licensed under the Apache License, Version 2.0 (the "License");
00023   you may not use this file except in compliance with the License.
00024   You may obtain a copy of the License at
00025 
00026       http://www.apache.org/licenses/LICENSE-2.0.txt
00027 
00028   Unless required by applicable law or agreed to in writing, software
00029   distributed under the License is distributed on an "AS IS" BASIS,
00030   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00031   See the License for the specific language governing permissions and
00032   limitations under the License.
00033 
00034 ==============================================================================*/
00035 
00072 #ifndef vtkPickingManager_h
00073 #define vtkPickingManager_h
00074 
00075 #include "vtkObject.h"
00076 #include "vtkRenderingCoreModule.h" // For export macro
00077 
00078 class vtkAbstractPicker;
00079 class vtkAbstractPropPicker;
00080 class vtkAssemblyPath;
00081 class vtkRenderer;
00082 class vtkRenderWindowInteractor;
00083 
00084 class VTKRENDERINGCORE_EXPORT vtkPickingManager : public vtkObject
00085 {
00086 public:
00087   static vtkPickingManager *New();
00088   vtkTypeMacro(vtkPickingManager,vtkObject);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00092 
00095   vtkBooleanMacro(Enabled, bool);
00096   vtkSetMacro(Enabled, bool);
00097   vtkGetMacro(Enabled, bool);
00099 
00101 
00108   void SetOptimizeOnInteractorEvents(bool optimize);
00109   vtkGetMacro(OptimizeOnInteractorEvents, bool);
00111 
00113 
00114   void SetInteractor(vtkRenderWindowInteractor* iren);
00115   vtkGetMacro(Interactor, vtkRenderWindowInteractor*);
00117 
00123   void AddPicker(vtkAbstractPicker* picker, vtkObject* object = 0);
00124 
00127   void RemovePicker(vtkAbstractPicker* picker, vtkObject* object = 0);
00128 
00132   void RemoveObject(vtkObject* object);
00133 
00138   bool Pick(vtkAbstractPicker* picker, vtkObject* object);
00139 
00142   bool Pick(vtkObject* object);
00143 
00146   bool Pick(vtkAbstractPicker* picker);
00147 
00149 
00154   vtkAssemblyPath* GetAssemblyPath(double X, double Y, double Z,
00155                                    vtkAbstractPropPicker* picker,
00156                                    vtkRenderer* renderer,
00157                                    vtkObject* obj);
00159 
00162   int GetNumberOfPickers();
00163 
00166   int GetNumberOfObjectsLinked(vtkAbstractPicker* picker);
00167 
00168 protected:
00169   vtkPickingManager();
00170   ~vtkPickingManager();
00171 
00172   // Used to associate the manager with the interactor
00173   vtkRenderWindowInteractor* Interactor;
00174   bool Enabled;
00175   bool OptimizeOnInteractorEvents;
00176 
00177 private:
00178   vtkPickingManager(const vtkPickingManager&);  // Not implemented.
00179   void operator=(const vtkPickingManager&);     // Not implemented.
00180 
00181   class vtkInternal;
00182   vtkInternal* Internal;
00183 };
00184 
00185 #endif