VTK
dox/Common/DataModel/vtkPlanes.h
Go to the documentation of this file.
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 "vtkCommonDataModelModule.h" // For export macro
00047 #include "vtkImplicitFunction.h"
00048 
00049 class vtkPlane;
00050 class vtkPoints;
00051 class vtkDataArray;
00052 
00053 class VTKCOMMONDATAMODEL_EXPORT vtkPlanes : public vtkImplicitFunction
00054 {
00055 public:
00056   static vtkPlanes *New();
00057   vtkTypeMacro(vtkPlanes,vtkImplicitFunction);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00062   double EvaluateFunction(double x[3]);
00063   double EvaluateFunction(double x, double y, double z)
00064     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00066 
00068   void EvaluateGradient(double x[3], double n[3]);
00069 
00071 
00073   virtual void SetPoints(vtkPoints*);
00074   vtkGetObjectMacro(Points,vtkPoints);
00076 
00078 
00080   void SetNormals(vtkDataArray* normals);
00081   vtkGetObjectMacro(Normals,vtkDataArray);
00083 
00086   void SetFrustumPlanes(double planes[24]);
00087 
00089 
00093   void SetBounds(const double bounds[6]);
00094   void SetBounds(double xmin, double xmax, double ymin, double ymax,
00095                  double zmin, double zmax);
00097 
00099   int GetNumberOfPlanes();
00100 
00102 
00106   vtkPlane *GetPlane(int i);
00107   void GetPlane(int i, vtkPlane *plane);
00109 
00110 protected:
00111   vtkPlanes();
00112   ~vtkPlanes();
00113 
00114   vtkPoints *Points;
00115   vtkDataArray *Normals;
00116   vtkPlane *Plane;
00117 
00118 private:
00119   double Planes[24];
00120   double Bounds[6];
00121 
00122 private:
00123   vtkPlanes(const vtkPlanes&);  // Not implemented.
00124   void operator=(const vtkPlanes&);  // Not implemented.
00125 };
00126 
00127 #endif
00128 
00129