VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPlanes.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 =========================================================================*/ 00043 #ifndef __vtkPlanes_h 00044 #define __vtkPlanes_h 00045 00046 #include "vtkImplicitFunction.h" 00047 00048 class vtkPlane; 00049 class vtkPoints; 00050 class vtkDataArray; 00051 00052 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction 00053 { 00054 public: 00055 static vtkPlanes *New(); 00056 vtkTypeMacro(vtkPlanes,vtkImplicitFunction); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00058 00060 00061 double EvaluateFunction(double x[3]); 00062 double EvaluateFunction(double x, double y, double z) 00063 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ; 00065 00067 void EvaluateGradient(double x[3], double n[3]); 00068 00070 00072 virtual void SetPoints(vtkPoints*); 00073 vtkGetObjectMacro(Points,vtkPoints); 00075 00077 00079 void SetNormals(vtkDataArray* normals); 00080 vtkGetObjectMacro(Normals,vtkDataArray); 00082 00085 void SetFrustumPlanes(double planes[24]); 00086 00088 00092 void SetBounds(double bounds[6]); 00093 void SetBounds(double xmin, double xmax, double ymin, double ymax, 00094 double zmin, double zmax); 00096 00098 int GetNumberOfPlanes(); 00099 00101 00105 vtkPlane *GetPlane(int i); 00106 void GetPlane(int i, vtkPlane *plane); 00108 00109 protected: 00110 vtkPlanes(); 00111 ~vtkPlanes(); 00112 00113 vtkPoints *Points; 00114 vtkDataArray *Normals; 00115 vtkPlane *Plane; 00116 00117 private: 00118 double Planes[24]; 00119 double Bounds[6]; 00120 00121 private: 00122 vtkPlanes(const vtkPlanes&); // Not implemented. 00123 void operator=(const vtkPlanes&); // Not implemented. 00124 }; 00125 00126 #endif 00127 00128