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

dox/Rendering/vtkCellPicker.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellPicker.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00037 #ifndef __vtkCellPicker_h
00038 #define __vtkCellPicker_h
00039 
00040 #include "vtkPicker.h"
00041 
00042 class vtkGenericCell;
00043 
00044 class VTK_RENDERING_EXPORT vtkCellPicker : public vtkPicker
00045 {
00046 public:
00047   static vtkCellPicker *New();
00048   vtkTypeRevisionMacro(vtkCellPicker,vtkPicker);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052 
00053   vtkGetMacro(CellId, vtkIdType);
00055 
00057 
00058   vtkGetMacro(SubId, int);
00060 
00062 
00064   vtkGetVectorMacro(PCoords, float,3);
00066 
00067 protected:
00068   vtkCellPicker();
00069   ~vtkCellPicker();
00070 
00071   vtkIdType CellId; // picked cell
00072   int SubId; // picked cell subId
00073   float PCoords[3]; // picked cell parametric coordinates
00074 
00075   virtual float IntersectWithLine(float p1[3], float p2[3], float tol, 
00076                                   vtkAssemblyPath *path, vtkProp3D *p, 
00077                                   vtkAbstractMapper3D *m);
00078   void Initialize();
00079   
00080 private:
00081   vtkGenericCell *Cell; //used to accelerate picking
00082   
00083 private:
00084   vtkCellPicker(const vtkCellPicker&);  // Not implemented.
00085   void operator=(const vtkCellPicker&);  // Not implemented.
00086 };
00087 
00088 #endif
00089 
00090