Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   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 =========================================================================*/
00047 #ifndef __vtkPlanes_h
00048 #define __vtkPlanes_h
00049 
00050 #include "vtkImplicitFunction.h"
00051 
00052 class vtkPlane;
00053 class vtkPoints;
00054 class vtkDataArray;
00055 
00056 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction
00057 {
00058 public:
00059   static vtkPlanes *New();
00060   vtkTypeRevisionMacro(vtkPlanes,vtkImplicitFunction);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00065   float EvaluateFunction(float x[3]);
00066   float EvaluateFunction(float x, float y, float z)
00067     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00069 
00071   void EvaluateGradient(float x[3], float n[3]);
00072 
00074 
00076   virtual void SetPoints(vtkPoints*);
00077   vtkGetObjectMacro(Points,vtkPoints);
00079   
00081 
00083   void SetNormals(vtkDataArray* normals);
00084   vtkGetObjectMacro(Normals,vtkDataArray);
00086 
00089   void SetFrustumPlanes(float planes[24]);
00090 
00092 
00096   void SetBounds(float bounds[6]);
00097   void SetBounds(float xmin, float xmax, float ymin, float ymax,
00098                  float zmin, float zmax);
00100 
00102   int GetNumberOfPlanes();
00103   
00107   vtkPlane *GetPlane(int i);
00108 
00109 protected:
00110   vtkPlanes();
00111   ~vtkPlanes();
00112 
00113   vtkPoints *Points;
00114   vtkDataArray *Normals;
00115   vtkPlane *Plane;
00116 
00117 private:
00118   float Planes[24];
00119   float Bounds[6];
00120 
00121 private:
00122   vtkPlanes(const vtkPlanes&);  // Not implemented.
00123   void operator=(const vtkPlanes&);  // Not implemented.
00124 };
00125 
00126 #endif
00127 
00128