VTK
|
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 =========================================================================*/ 00030 #ifndef __vtkCellPicker_h 00031 #define __vtkCellPicker_h 00032 00033 #include "vtkPicker.h" 00034 00035 class vtkGenericCell; 00036 00037 class VTK_RENDERING_EXPORT vtkCellPicker : public vtkPicker 00038 { 00039 public: 00040 static vtkCellPicker *New(); 00041 vtkTypeRevisionMacro(vtkCellPicker,vtkPicker); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 00046 vtkGetMacro(CellId, vtkIdType); 00048 00050 00051 vtkGetMacro(SubId, int); 00053 00055 00057 vtkGetVectorMacro(PCoords, double,3); 00059 00060 protected: 00061 vtkCellPicker(); 00062 ~vtkCellPicker(); 00063 00064 vtkIdType CellId; // picked cell 00065 int SubId; // picked cell subId 00066 double PCoords[3]; // picked cell parametric coordinates 00067 00068 virtual double IntersectWithLine(double p1[3], double p2[3], double tol, 00069 vtkAssemblyPath *path, vtkProp3D *p, 00070 vtkAbstractMapper3D *m); 00071 void Initialize(); 00072 00073 private: 00074 vtkGenericCell *Cell; //used to accelerate picking 00075 00076 private: 00077 vtkCellPicker(const vtkCellPicker&); // Not implemented. 00078 void operator=(const vtkCellPicker&); // Not implemented. 00079 }; 00080 00081 #endif 00082 00083