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

Helix.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/geometry/geometry/Helix.h,v 1.2 2000/01/18 00:42:06 burnett Exp $
00002 //
00003 #ifndef GEOMETRY_HELIX_H
00004 #define GEOMETRY_HELIX_H
00005 
00006 #include "geometry/Ray.h"
00007 
00009 class Helix : public Ray
00010 {
00011  public:
00012    Helix( const Point& p, const Vector& d, const Vector& a,
00013                          double r );
00014    Helix( const Helix& h );
00015 
00016 
00018    Point position( double step ) const;
00020    Vector direction( double step ) const;
00021 
00023    double curvature(double =0) const{ return rho? 1.0/rho : FLT_MAX; }
00024 
00025 
00027    double step() const { return rho? 2.* fabs(rho) : FLT_MAX; }
00028 
00029    GeomObject& transform( const CoordTransform &);
00030 
00031    const char *nameOf() const { return "Helix"; }
00032    void printOn( std::ostream& os = std::cout ) const;
00033 
00034  private:
00035    Vector axis;         // helix axis direction (unit vector)
00036    double rho;          // helix radius, sign significant
00037    Vector perp;         // perpendicular direction
00038    double parallel;     // component along axis (for efficiency)
00039    void updateCache(double)const;
00040 };
00041 
00042 #endif
00043 

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