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

dox/Common/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 =========================================================================*/ 00033 #ifndef __vtkBox_h 00034 #define __vtkBox_h 00035 00036 #include "vtkImplicitFunction.h" 00037 00038 class VTK_COMMON_EXPORT vtkBox : public vtkImplicitFunction 00039 { 00040 public: 00041 vtkTypeRevisionMacro(vtkBox,vtkImplicitFunction); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 static vtkBox *New(); 00046 00048 00049 double EvaluateFunction(double x[3]); 00050 double EvaluateFunction(double x, double y, double z) 00051 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } 00053 00055 void EvaluateGradient(double x[3], double n[3]); 00056 00058 00059 vtkSetVector3Macro(XMin,double); 00060 vtkGetVector3Macro(XMin,double); 00061 vtkSetVector3Macro(XMax,double); 00062 vtkGetVector3Macro(XMax,double); 00063 void SetBounds(double xMin, double xMax, 00064 double yMin, double yMax, 00065 double zMin, double zMax); 00066 void SetBounds(double bounds[6]); 00067 void GetBounds(double &xMin, double &xMax, 00068 double &yMin, double &yMax, 00069 double &zMin, double &zMax); 00070 void GetBounds(double bounds[6]); 00072 00074 00081 static char IntersectBox(double bounds[6], double origin[3], double dir[3], 00082 double coord[3], double& t); 00084 00085 protected: 00086 vtkBox(); 00087 ~vtkBox() {} 00088 00089 double XMin[3]; 00090 double XMax[3]; 00091 00092 private: 00093 vtkBox(const vtkBox&); // Not implemented. 00094 void operator=(const vtkBox&); // Not implemented. 00095 }; 00096 00097 #endif 00098 00099