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

Common/vtkPlanes.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPlanes.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00060 #ifndef __vtkPlanes_h
00061 #define __vtkPlanes_h
00062 
00063 #include "vtkImplicitFunction.h"
00064 
00065 class vtkPlane;
00066 class vtkPoints;
00067 class vtkDataArray;
00068 
00069 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction
00070 {
00071 public:
00072   static vtkPlanes *New();
00073   vtkTypeRevisionMacro(vtkPlanes,vtkImplicitFunction);
00074   void PrintSelf(ostream& os, vtkIndent indent);
00075 
00077 
00078   float EvaluateFunction(float x[3]);
00079   float EvaluateFunction(float x, float y, float z)
00080     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00082 
00084   void EvaluateGradient(float x[3], float n[3]);
00085 
00087 
00089   virtual void SetPoints(vtkPoints*);
00090   vtkGetObjectMacro(Points,vtkPoints);
00092   
00094 
00096   void SetNormals(vtkDataArray* normals);
00097   vtkGetObjectMacro(Normals,vtkDataArray);
00099 
00102   void SetFrustumPlanes(float planes[24]);
00103 
00105 
00109   void SetBounds(float bounds[6]);
00110   void SetBounds(float xmin, float xmax, float ymin, float ymax,
00111                  float zmin, float zmax);
00113 
00115   int GetNumberOfPlanes();
00116   
00120   vtkPlane *GetPlane(int i);
00121 
00122 protected:
00123   vtkPlanes();
00124   ~vtkPlanes();
00125 
00126   vtkPoints *Points;
00127   vtkDataArray *Normals;
00128   vtkPlane *Plane;
00129 
00130 private:
00131   float Planes[24];
00132   float Bounds[6];
00133 
00134 private:
00135   vtkPlanes(const vtkPlanes&);  // Not implemented.
00136   void operator=(const vtkPlanes&);  // Not implemented.
00137 };
00138 
00139 #endif
00140 
00141