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

SlicedCone.h

Go to the documentation of this file.
00001 //    $Id: SlicedCone.h,v 1.2 2001/01/23 03:41:32 burnett Exp $
00002 // Author: Toby Burnett
00003 
00004 #ifndef GEOMETRY_SlicedCone_H
00005 #define GEOMETRY_SlicedCone_H
00006 // Subclass of LayeredMedium, that implements a Cone sliced by planes
00008 #include "gismo/LayeredMedium.h"
00009 #include "geometry/Cone.h"
00010 
00011 
00012 class SlicedCone : public LayeredMedium {
00013 public:
00014     SlicedCone(Medium* mother, const Cone& theCone);
00015     // the Cone parameter is a temporary to pick up parameters, specifically the
00016     // inner and outer Conic surfaces (resulting cone may not have same length)
00017 
00018     Medium& addLayer(double thickness, const char* material="vacuum",
00019                          Detector* det=0);
00020     // add a new layer after the previous one. The enclosing Cone will be increased
00021     // returns reference to the new medium for further modification (title, e.g.)
00022     
00023 
00024     double length()const{return m_length;}
00025     const Point& center()const;
00026     const Vector& axis()const;
00027     // access to geometrical stuff describing the  
00028 
00029     void createDetectorView(gui::DisplayRep& view);
00030 
00031     const char* nameOf()const{return "SlicedCone";}
00032 
00033 private:
00034 
00035     double m_length;
00036     // total length
00037     double m_outer_radius, m_inner_radius, m_outer_slope, m_inner_slope;
00038     // Cone parameters that can be used draw the object
00039 
00040 };
00041 //=========================== Inlines ======================================-
00042 inline const Point&  SlicedCone::center()const
00043 {
00044     return m_vol->center();
00045 }
00046 inline const Vector& SlicedCone::axis() const
00047 {
00048     return m_vol->surface(1).direction();
00049 }
00050 #endif
00051 

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