proj home

Files   Classes   Functions   Hierarchy  

d2circle.h

Go to the documentation of this file.
00001 #ifndef D2CIRCLE_H
00002 #define D2CIRCLE_H
00003 
00004 #include <point.h>
00005 
00006 #include <d2func.h>
00007 
00008 typedef point2<double> pt2;
00009 typedef point2<double> const pt2c;
00010 
00011 class d2circle : public d2func
00012 {
00013 public:
00014 
00015   pt2 center;
00016   double radius;
00017 
00018   d2circle( pt2c & _center, double const _radius )
00019     : center(_center), radius(_radius) {}
00020 
00021   virtual double const eval( pt2c & X ) const
00022   { 
00023     pt2 Y(X);
00024     Y -= center;
00025     return radius*radius - Y.dot();
00026   }
00027 
00028 };
00029 
00030 #endif
00031 
00032 

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