Files Classes Functions Hierarchy
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
1.5.8