proj home

Files   Classes   Functions   Hierarchy  

d3circlepartition.h

Go to the documentation of this file.
00001 #ifndef D3CIRCLEPARTITION
00002 #define D3CIRCLEPARTITION
00003 
00004 #include <point.h>
00005 #include <partitionspace.h>
00006 
00007 typedef point2<double> pt2;
00008 typedef point2<double> const pt2c;
00009 typedef point3<double> pt3;
00010 typedef point3<double> const pt3c;
00011 
00012 class d3circlepartition : public partitionspace<pt3,double>
00013 {
00014 public:
00015 
00016   pt2 x0;
00017   double radius;
00018 
00019   d3circlepartition()
00020     : radius(1.0) {}
00021 
00022   d3circlepartition( pt2c _x0, double const _radius )
00023     : x0(_x0), radius(_radius) {}
00024   
00025   bool const isInside(pt3c & x) const
00026   {
00027     pt2 z(x.x,x.y);
00028     z -= x0;
00029     return z.dot() < radius*radius;
00030   }
00031 
00032   bool const intersection(pt3 & x, pt3c & w, pt3c & b) const;
00033 
00034   bool const isOnBoundary(pt3c & w, double const zero) const;
00035 
00036 };
00037 
00038 
00039 
00040 #endif
00041 
00042 

Generated on Fri Mar 4 00:49:26 2011 for Chelton Evans Source by  doxygen 1.5.8