• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

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 class vtkBoundingBox;
00038 
00039 class VTK_COMMON_EXPORT vtkBox : public vtkImplicitFunction
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkBox,vtkImplicitFunction);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046   static vtkBox *New();
00047 
00049 
00050   double EvaluateFunction(double x[3]);
00051   double EvaluateFunction(double x, double y, double z)
00052     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); }
00054 
00056   void EvaluateGradient(double x[3], double n[3]);
00057 
00059 
00060   void SetXMin(double p[3]);
00061   void SetXMin(double x, double y, double z);
00062   void GetXMin(double p[3]);
00063   void GetXMin(double &x, double &y, double &z);
00065 
00066   void SetXMax(double p[3]);
00067   void SetXMax(double x, double y, double z);
00068   void GetXMax(double p[3]);
00069   void GetXMax(double &x, double &y, double &z);
00070 
00071   void SetBounds(double xMin, double xMax,
00072                  double yMin, double yMax,
00073                  double zMin, double zMax);
00074   void SetBounds(double bounds[6]);
00075   void GetBounds(double &xMin, double &xMax,
00076                  double &yMin, double &yMax,
00077                  double &zMin, double &zMax);
00078   void GetBounds(double bounds[6]);
00079   double *GetBounds();
00080 
00085   void AddBounds(double bounds[6]);
00086 
00088 
00095   static char IntersectBox(double bounds[6], double origin[3], double dir[3], 
00096                            double coord[3], double& t);
00098 
00099 protected:
00100   vtkBox();
00101   ~vtkBox();
00102 
00103   vtkBoundingBox *BBox; 
00104   double Bounds[6]; //supports the GetBounds() method
00105 
00106 private:
00107   vtkBox(const vtkBox&);  // Not implemented.
00108   void operator=(const vtkBox&);  // Not implemented.
00109 };
00110 
00111 
00112 
00113 inline void vtkBox::SetXMin(double p[3]) 
00114 {
00115   this->SetXMin(p[0], p[1], p[2]);
00116 }
00117 
00118 inline void vtkBox::SetXMax(double p[3]) 
00119 {
00120   this->SetXMax(p[0], p[1], p[2]);
00121 }
00122 
00123 
00124 #endif
00125 
00126 

Generated by  doxygen 1.7.1