box.h

Go to the documentation of this file.
00001 #ifndef BOX_H
00002 #define BOX_H
00003 
00004 #include "meshmorph.h"
00005 
00006 class Box
00007 {
00008 private:
00009   vec_fp f;   // vector of face pointers
00010   int x,y,z;  // indices of box in space
00011 public:
00012   Box(int a,int b,int c)
00013         :f(),x(a),y(b),z(c)
00014   {
00015   }
00016 
00017   void    printBox    (double const &,double const &,double const &) const;
00018   void    removeFace  (Face const * const);
00019 
00026   double xmin(double const & index) const
00027   {
00028     return index + SPACE_LENGTH*SCALE*x;
00029   }
00030 
00037   double xmax(double const & index) const
00038   {
00039     return index + SPACE_LENGTH*SCALE*(x+1);
00040   }
00041 
00048   double ymin(double const & index) const
00049   {
00050     return index + SPACE_LENGTH*SCALE*y;
00051   }
00052 
00059   double ymax(double const & index) const
00060   {
00061     return index + SPACE_LENGTH*SCALE*(y+1);
00062   }
00063 
00070   double zmin(double const & index) const
00071   {
00072     return index + SPACE_LENGTH*SCALE*z;
00073   }
00074 
00081   double zmax(double const & index) const
00082   {
00083     return index + SPACE_LENGTH*SCALE*(z+1);
00084   }
00085 
00091   fp_cit begin (void) const
00092   {
00093     return f.begin();
00094   }
00095 
00101   fp_cit end (void) const
00102   {
00103     return f.end();
00104   }
00105 
00110   int getNumFaces (void) const
00111   {
00112     return f.size();
00113   }
00114 
00118   void sortFaces (void)
00119   {
00120     sort(f.begin(),f.end());
00121   }
00122 
00127   void addFace (Face * const face)
00128   {
00129     f.push_back(face);
00130   }
00131 
00135   void clearFaces (void)
00136   {
00137     f.clear();
00138   }
00139 };
00140 
00141 #endif

Generated on Sun Aug 3 14:17:19 2008 for meshmorph by  doxygen 1.5.1