proj home

Files   Classes   Functions   Hierarchy  

d3sphere.h

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

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