Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Conic.h

Go to the documentation of this file.
00001 //     $Header: /nfs/slac/g/glast/ground/cvs/geometry/geometry/Conic.h,v 1.2 2000/01/18 00:42:05 burnett Exp $
00002 //  Author: T. Burnett
00003 // Project: geometry
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     // implicit destructor
00020     // implicit copy constructor
00021     // implicit assignment operator
00022 
00023     virtual double how_near( const Point& x ) const;
00024     virtual double distance( const Point& x ,const Vector& v, int ) const;
00025     // specify geometry
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     // radius at position z from origin along axis
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;    // tangent of opening angle
00042     double m_radius;    // radius at the point          
00043     // note that both are negated to reverse sense of surface
00044 };
00045 
00046 #endif //GEOMETRY_CONIC_H
00047 

Generated at Mon Nov 26 18:18:21 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000