47 #ifdef BUILD_SPHERES_DLL
48 #define EGS_SPHERES_EXPORT __declspec(dllexport)
50 #define EGS_SPHERES_EXPORT __declspec(dllimport)
52 #define EGS_SPHERES_LOCAL
56 #ifdef HAVE_VISIBILITY
57 #define EGS_SPHERES_EXPORT __attribute__ ((visibility ("default")))
58 #define EGS_SPHERES_LOCAL __attribute__ ((visibility ("hidden")))
60 #define EGS_SPHERES_EXPORT
61 #define EGS_SPHERES_LOCAL
143 const string &Name =
"");
165 EGS_Float &t,
int *newmed=0,
EGS_Vector *normal=0);
174 const string &
getType()
const {
181 EGS_Float
getBound(
int idir,
int ind);
196 std::vector<EGS_Float> rbounds;
197 std::vector<EGS_Float> vol;
241 const string &
getType()
const {
247 EGS_Float
getBound(
int idir,
int ind);
260 std::vector<EGS_Float> vol;
virtual const string & getType() const =0
Get the geometry type.
virtual bool isInside(const EGS_Vector &x)=0
Is the position x inside the geometry?
virtual int getNRegDir(int idir)
virtual void printInfo() const
Print information about this geometry.
virtual EGS_Float howfarToOutside(int ireg, const EGS_Vector &x, const EGS_Vector &u)
virtual int getMaxStep() const
Returns the maximum number of steps through the geometry.
A class representing 3D vectors.
virtual EGS_Float getVolume(int ireg)
Calculates the volume of region ireg.
virtual int isWhere(const EGS_Vector &x)=0
In which region is poisition x?
virtual int howfar(int ireg, const EGS_Vector &x, const EGS_Vector &u, EGS_Float &t, int *newmed=0, EGS_Vector *normal=0)=0
Calculate the distance to a boundary from x along the direction u.
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual EGS_Float getBound(int idir, int ind)
Returns region boundaries in direction determined by idir.
virtual int inside(const EGS_Vector &x)=0
Returns the region index, if inside, or -1 if outside (obsolete)
Implements a spherical shell geometry with a hollow centre.
virtual EGS_Float hownear(int ireg, const EGS_Vector &x)=0
Calculate the distance to a boundary for position x in any direction.
A set of concentric spheres.
EGS_BaseGeometry class header file.
int nreg
Number of local regions in this geometry.