Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPlanes.h

Go to the documentation of this file.
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 =========================================================================*/
00056 #ifndef __vtkPlanes_h
00057 #define __vtkPlanes_h
00058 
00059 #include "vtkImplicitFunction.h"
00060 
00061 class vtkPlane;
00062 class vtkPoints;
00063 class vtkDataArray;
00064 
00065 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction
00066 {
00067 public:
00068   static vtkPlanes *New();
00069   vtkTypeRevisionMacro(vtkPlanes,vtkImplicitFunction);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073 
00074   double EvaluateFunction(double x[3]);
00075   double EvaluateFunction(double x, double y, double z)
00076     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00078 
00080   void EvaluateGradient(double x[3], double n[3]);
00081 
00083 
00085   virtual void SetPoints(vtkPoints*);
00086   vtkGetObjectMacro(Points,vtkPoints);
00088   
00090 
00092   void SetNormals(vtkDataArray* normals);
00093   vtkGetObjectMacro(Normals,vtkDataArray);
00095 
00098   void SetFrustumPlanes(double planes[24]);
00099 
00101 
00105   void SetBounds(double bounds[6]);
00106   void SetBounds(double xmin, double xmax, double ymin, double ymax,
00107                  double zmin, double zmax);
00109 
00111   int GetNumberOfPlanes();
00112   
00114 
00118   vtkPlane *GetPlane(int i);
00119   void GetPlane(int i, vtkPlane *plane);
00121 
00122 protected:
00123   vtkPlanes();
00124   ~vtkPlanes();
00125 
00126   vtkPoints *Points;
00127   vtkDataArray *Normals;
00128   vtkPlane *Plane;
00129 
00130 private:
00131   double Planes[24];
00132   double Bounds[6];
00133 
00134 private:
00135   vtkPlanes(const vtkPlanes&);  // Not implemented.
00136   void operator=(const vtkPlanes&);  // Not implemented.
00137 };
00138 
00139 #endif
00140 
00141