VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkVolumePicker.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 =========================================================================*/ 00038 #ifndef __vtkVolumePicker_h 00039 #define __vtkVolumePicker_h 00040 00041 #include "vtkRenderingVolumeModule.h" // For export macro 00042 #include "vtkCellPicker.h" 00043 00044 class VTKRENDERINGVOLUME_EXPORT vtkVolumePicker : public vtkCellPicker 00045 { 00046 public: 00047 static vtkVolumePicker *New(); 00048 vtkTypeMacro(vtkVolumePicker, vtkCellPicker); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00057 vtkSetMacro(PickCroppingPlanes, int); 00058 vtkBooleanMacro(PickCroppingPlanes, int); 00059 vtkGetMacro(PickCroppingPlanes, int); 00061 00063 00068 vtkGetMacro(CroppingPlaneId, int); 00070 00071 protected: 00072 vtkVolumePicker(); 00073 ~vtkVolumePicker(); 00074 00075 virtual void ResetPickInfo(); 00076 00077 virtual double IntersectVolumeWithLine(const double p1[3], 00078 const double p2[3], 00079 double t1, double t2, 00080 vtkProp3D *prop, 00081 vtkAbstractVolumeMapper *mapper); 00082 00083 static int ClipLineWithCroppingRegion(const double bounds[6], 00084 const int extent[6], int flags, 00085 const double x1[3], const double x2[3], 00086 double t1, double t2, 00087 int &extentPlaneId, int &numSegments, 00088 double *t1List, double *t2List, 00089 double *s1List, int *planeIdList); 00090 00091 int PickCroppingPlanes; 00092 int CroppingPlaneId; 00093 00094 private: 00095 vtkVolumePicker(const vtkVolumePicker&); // Not implemented. 00096 void operator=(const vtkVolumePicker&); // Not implemented. 00097 }; 00098 00099 #endif 00100 00101