Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00059 #ifndef __vtkPlanes_h
    00060 #define __vtkPlanes_h
    00061
    00062 #include "vtkImplicitFunction.h"
    00063
    00064 class vtkPlane;
    00065 class vtkPoints;
    00066 class vtkDataArray;
    00067
    00068 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction
    00069 {
    00070 public:
    00071   static vtkPlanes *New();
    00072   vtkTypeRevisionMacro(vtkPlanes,vtkImplicitFunction);
    00073   void PrintSelf(ostream& os, vtkIndent indent);
    00074
    00076
    00077   float EvaluateFunction(float x[3]);
    00078   float EvaluateFunction(float x, float y, float z)
    00079     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
    00081
    00083   void EvaluateGradient(float x[3], float n[3]);
    00084
    00086
    00088   virtual void SetPoints(vtkPoints*);
    00089   vtkGetObjectMacro(Points,vtkPoints);
    00091
    00093
    00095   void SetNormals(vtkDataArray* normals);
    00096   vtkGetObjectMacro(Normals,vtkDataArray);
    00098
    00101   void SetFrustumPlanes(float planes[24]);
    00102
    00104
    00108   void SetBounds(float bounds[6]);
    00109   void SetBounds(float xmin, float xmax, float ymin, float ymax,
    00110                  float zmin, float zmax);
    00112
    00114   int GetNumberOfPlanes();
    00115
    00119   vtkPlane *GetPlane(int i);
    00120
    00121 protected:
    00122   vtkPlanes();
    00123   ~vtkPlanes();
    00124
    00125   vtkPoints *Points;
    00126   vtkDataArray *Normals;
    00127   vtkPlane *Plane;
    00128
    00129 private:
    00130   float Planes[24];
    00131   float Bounds[6];
    00132
    00133 private:
    00134   vtkPlanes(const vtkPlanes&);  // Not implemented.
    00135   void operator=(const vtkPlanes&);  // Not implemented.
    00136 };
    00137
    00138 #endif
    00139
    00140