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

Shape.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/geometry/geometry/Shape.h,v 1.2 2000/01/18 00:42:09 burnett Exp $
00002 //
00003 
00004 #ifndef GEOMETRY_SHAPE_H
00005 #define GEOMETRY_SHAPE_H
00006 
00007 #include "geometry/Point.h"
00008 #include <cfloat> // for FLT_MAX on NT
00009 
00010 class Ray;
00011 class Medium;
00012 
00019 class Shape : public GeomObject
00020 {
00021  public:
00028     virtual double distanceToLeave( const Ray& r, double maxStep  = FLT_MAX )const=0;
00029     virtual double distanceToEnter( const Ray& r, double maxStep  = FLT_MAX )const=0;
00030 
00032     virtual int inside ( const Point& x ) const=0;
00033 
00034     void printOn(std::ostream&)const;
00035 
00037     const Point& center()const;
00038 
00039     GeomObject& transform(const CoordTransform&);
00040 
00042     virtual Shape& copy()const;
00043 
00045     virtual int getBoundaryIndex(const Point& )const{return -1;}
00046 
00048     virtual int lastBoundaryIndex()const{return -1;}
00049 
00051     virtual double getMaxDimension() const { return FLT_MAX; }
00052 
00053  protected:
00054     Shape();
00055     // default constructor accessible to subclasses
00056 
00057  private:
00058    Shape(const Shape& ){};
00059     // copy constructor not allowed
00060 
00061   Point _center;
00062  // central point
00063 };
00064 inline const Point&
00065 Shape::center()const {return _center;}
00066 #endif
00067 
00068 
00069 

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