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

vtkBox.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBox.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 =========================================================================*/
00044 #ifndef __vtkBox_h
00045 #define __vtkBox_h
00046 
00047 #include "vtkImplicitFunction.h"
00048 
00049 class VTK_COMMON_EXPORT vtkBox : public vtkImplicitFunction
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkBox,vtkImplicitFunction);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056   static vtkBox *New();
00057 
00059 
00060   double EvaluateFunction(double x[3]);
00061   double EvaluateFunction(double x, double y, double z)
00062     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); }
00064 
00066   void EvaluateGradient(double x[3], double n[3]);
00067 
00069 
00070   vtkSetVector3Macro(XMin,double);
00071   vtkGetVector3Macro(XMin,double);
00072   vtkSetVector3Macro(XMax,double);
00073   vtkGetVector3Macro(XMax,double);
00074   void SetBounds(double xMin, double xMax,
00075                  double yMin, double yMax,
00076                  double zMin, double zMax);
00077   void SetBounds(double bounds[6]);
00078   void GetBounds(double &xMin, double &xMax,
00079                  double &yMin, double &yMax,
00080                  double &zMin, double &zMax);
00081   void GetBounds(double bounds[6]);
00083 
00085 
00092   static char IntersectBox(double bounds[6], double origin[3], double dir[3], 
00093                            double coord[3], double& t);
00095 
00096 protected:
00097   vtkBox();
00098   ~vtkBox() {}
00099 
00100   double XMin[3];
00101   double XMax[3];
00102 
00103 private:
00104   vtkBox(const vtkBox&);  // Not implemented.
00105   void operator=(const vtkBox&);  // Not implemented.
00106 };
00107 
00108 #endif
00109 
00110