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

Field.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/gismo/gismo/Field.h,v 1.2 2000/01/17 23:37:18 burnett Exp $
00002 
00003 
00004 #ifndef GISMO_FIELD_H
00005 #define GISMO_FIELD_H
00006 
00007 #include "geometry/Point.h"
00008 
00009 #include <vector>
00010 class Ray;
00011 
00015 class Field
00016 {
00017 protected:
00018 
00019    Vector constB;
00020    // the value of the constant field
00021 
00022    unsigned int id;
00023    // a unique identifier for I/O
00024 
00025  public:
00026    Field();
00027    Field(double,double,double);
00028    Field(const Vector & );
00029    // constructors
00030 
00031    virtual ~Field() {}
00032 
00033    virtual const Vector& valueAt(const Vector& r)const {return constB;}
00034    void setConstField( Vector& B) {constB = B;}
00035    const char* nameOf() const { return "Field"; }
00036 
00038    Ray* CreateRay(const Point&, const Vector&, float, float=0)const;
00039 
00040     //   Methods associated with GUI and Printing
00041     virtual void printOn( std::ostream& os = std::cout ) const;
00042 
00043 
00044     typedef std::vector<Field*> Field_list;
00045     static Field_list theFields;
00046     // a list of unique field objects
00047 
00048 protected:
00049 
00050    void checkAppend();
00051    // add the current Field to the FieldList if it is unique
00052 
00053 };
00054 
00055 #endif

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