00001
00002
00003
00004
00005
00006 #ifndef GEOMETRY_CONIC_H
00007 #define GEOMETRY_CONIC_H
00008
00009 #include "geometry/Surface.h"
00010
00012 class Conic: public Surface
00013 {
00014 public:
00015
00017 Conic( const Point& o, const Vector& a, double radius, double slope );
00018
00019
00020
00021
00022
00023 virtual double how_near( const Point& x ) const;
00024 virtual double distance( const Point& x ,const Vector& v, int ) const;
00025
00026
00028 virtual Vector normal( const Point& x )const;
00029
00030 const Vector& axis()const{return Surface::direction();}
00031
00032 double radius(double z=0)const{return m_radius+z*m_slope;}
00033
00034
00035 virtual const char *nameOf() const { return "Conic"; }
00036 virtual void printOn( std::ostream& os = std::cout ) const;
00037
00038
00039 private:
00040
00041 double m_slope;
00042 double m_radius;
00043
00044 };
00045
00046 #endif //GEOMETRY_CONIC_H
00047