Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCellPicker.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellPicker.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 =========================================================================*/
00045 #ifndef __vtkCellPicker_h
00046 #define __vtkCellPicker_h
00047 
00048 #include "vtkPicker.h"
00049 
00050 class vtkGenericCell;
00051 
00052 class VTK_RENDERING_EXPORT vtkCellPicker : public vtkPicker
00053 {
00054 public:
00055   static vtkCellPicker *New();
00056   vtkTypeRevisionMacro(vtkCellPicker,vtkPicker);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   vtkGetMacro(CellId, vtkIdType);
00063 
00065 
00066   vtkGetMacro(SubId, int);
00068 
00070 
00072   vtkGetVectorMacro(PCoords, double,3);
00074 
00075 protected:
00076   vtkCellPicker();
00077   ~vtkCellPicker();
00078 
00079   vtkIdType CellId; // picked cell
00080   int SubId; // picked cell subId
00081   double PCoords[3]; // picked cell parametric coordinates
00082 
00083   virtual double IntersectWithLine(double p1[3], double p2[3], double tol, 
00084                                   vtkAssemblyPath *path, vtkProp3D *p, 
00085                                   vtkAbstractMapper3D *m);
00086   void Initialize();
00087   
00088 private:
00089   vtkGenericCell *Cell; //used to accelerate picking
00090   
00091 private:
00092   vtkCellPicker(const vtkCellPicker&);  // Not implemented.
00093   void operator=(const vtkCellPicker&);  // Not implemented.
00094 };
00095 
00096 #endif
00097 
00098