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

LayeredMedium Class Reference

Abstract class that defines a composite medium that is divided, or layered, with layers defined by a surface, the first surface of an associated Volume, and a list of offsets to be compared with the how_near function of that surface. More...

#include <LayeredMedium.h>

Inheritance diagram for LayeredMedium:

CompositeMedium Medium MediumList GeomObject LayeredBox SlicedCone List of all members.

Public Methods

virtual ~LayeredMedium ()
 dtor. More...

virtual double distanceToLeave ( const Ray& r, const Medium*& nextMedium, double maxStep ) const
 Methods for tracking. More...

virtual double distanceToEnter ( const Ray& r, const Medium*& nextMedium, double maxStep) const
 if enters, sets nextMedium to the particular slice. More...

const Mediuminside (const Point& x) const
 will check if the Ray intersects an internal Medium return the Medium that the point is inside, perhaps an internal one. More...

virtual void createDetectorView (gui::DisplayRep& v)
 override to prevent attempted display of Slice: sub class must do its own thing. More...

 LayeredMedium (Medium* mother, int num_sufaces, double inner_offset=0)
MediumaddLayer (Medium * inner_medium, double thickness)
virtual const Mediumselect (const Point& x) const
const Surface& referenceSurface () const

Public Attributes

std::vector<double> m_offset
Volumem_vol

Private Attributes

int m_select_index
int m_last_boundary

Friends

class  Slice

Detailed Description

Abstract class that defines a composite medium that is divided, or layered, with layers defined by a surface, the first surface of an associated Volume, and a list of offsets to be compared with the how_near function of that surface.

The geometry of each inner Medium is defined by a special Volume, LayeredMedium::Slice, that owns no surfaces, but "borrows" those of the parent medium, but with the offsets of the first two set from the list of offsets.

Definition at line 18 of file LayeredMedium.h.


Constructor & Destructor Documentation

LayeredMedium::~LayeredMedium ( ) [virtual]
 

dtor.

Definition at line 101 of file LayeredMedium.cxx.

LayeredMedium::LayeredMedium ( Medium * mother,
int num_surfaces,
double inner_offset = 0 )
 

Definition at line 92 of file LayeredMedium.cxx.


Member Function Documentation

Medium & LayeredMedium::addLayer ( Medium * inner_medium,
double thickness )
 

Definition at line 106 of file LayeredMedium.cxx.

Referenced by SlicedCone::addLayer(), and LayeredBox::addLayer().

void LayeredMedium::createDetectorView ( gui::DisplayRep & v ) [inline, virtual]
 

override to prevent attempted display of Slice: sub class must do its own thing.

Reimplemented from CompositeMedium.

Reimplemented in LayeredBox, and SlicedCone.

Definition at line 34 of file LayeredMedium.h.

double LayeredMedium::distanceToEnter ( const Ray & r,
const Medium *& m,
double t ) const [virtual]
 

if enters, sets nextMedium to the particular slice.

Reimplemented from Medium.

Definition at line 122 of file LayeredMedium.cxx.

double LayeredMedium::distanceToLeave ( const Ray & r,
const Medium *& nextMedium,
double maxDist ) const [virtual]
 

Methods for tracking.

Reimplemented from CompositeMedium.

Definition at line 136 of file LayeredMedium.cxx.

Referenced by LayeredMedium::Slice::distanceToLeave().

const Medium * LayeredMedium::inside ( const Point & x ) const [virtual]
 

will check if the Ray intersects an internal Medium return the Medium that the point is inside, perhaps an internal one.

Reimplemented from CompositeMedium.

Definition at line 194 of file LayeredMedium.cxx.

const Surface & LayeredMedium::referenceSurface ( ) const
 

Definition at line 173 of file LayeredMedium.cxx.

Referenced by LayeredBox::createDetectorView().

const Medium * LayeredMedium::select ( const Point & x ) const [virtual]
 

Definition at line 178 of file LayeredMedium.cxx.


Friends And Related Function Documentation

class Slice [friend]
 

Definition at line 107 of file LayeredMedium.h.


Member Data Documentation

int LayeredMedium::m_last_boundary [private]
 

Definition at line 117 of file LayeredMedium.h.

std::vector< double > LayeredMedium::m_offset
 

Definition at line 109 of file LayeredMedium.h.

int LayeredMedium::m_select_index [private]
 

Definition at line 116 of file LayeredMedium.h.

Volume * LayeredMedium::m_vol
 

Definition at line 112 of file LayeredMedium.h.


The documentation for this class was generated from the following files:
Generated at Mon Nov 26 18:18:40 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000