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