VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImplicitSelectionLoop.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 =========================================================================*/ 00050 #ifndef __vtkImplicitSelectionLoop_h 00051 #define __vtkImplicitSelectionLoop_h 00052 00053 #include "vtkCommonDataModelModule.h" // For export macro 00054 #include "vtkImplicitFunction.h" 00055 00056 class vtkPoints; 00057 class vtkPolygon; 00058 00059 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitSelectionLoop : public vtkImplicitFunction 00060 { 00061 public: 00063 00064 vtkTypeMacro(vtkImplicitSelectionLoop,vtkImplicitFunction); 00065 void PrintSelf(ostream& os, vtkIndent indent); 00067 00069 static vtkImplicitSelectionLoop *New(); 00070 00072 00073 double EvaluateFunction(double x[3]); 00074 double EvaluateFunction(double x, double y, double z) 00075 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ; 00077 00079 void EvaluateGradient(double x[3], double n[3]); 00080 00082 00084 virtual void SetLoop(vtkPoints*); 00085 vtkGetObjectMacro(Loop,vtkPoints); 00087 00089 00092 vtkSetMacro(AutomaticNormalGeneration,int); 00093 vtkGetMacro(AutomaticNormalGeneration,int); 00094 vtkBooleanMacro(AutomaticNormalGeneration,int); 00096 00098 00100 vtkSetVector3Macro(Normal,double); 00101 vtkGetVectorMacro(Normal,double,3); 00103 00105 unsigned long GetMTime(); 00106 00107 protected: 00108 vtkImplicitSelectionLoop(); 00109 ~vtkImplicitSelectionLoop(); 00110 00111 vtkPoints *Loop; 00112 double Normal[3]; 00113 int AutomaticNormalGeneration; 00114 00115 private: 00116 void Initialize(); 00117 vtkPolygon *Polygon; 00118 00119 double Origin[3]; 00120 double Bounds[6]; //bounds of the projected polyon 00121 double DeltaX; 00122 double DeltaY; 00123 double DeltaZ; 00124 00125 vtkTimeStamp InitializationTime; 00126 00127 private: 00128 vtkImplicitSelectionLoop(const vtkImplicitSelectionLoop&); // Not implemented. 00129 void operator=(const vtkImplicitSelectionLoop&); // Not implemented. 00130 }; 00131 00132 #endif 00133 00134