40 #ifndef EGS_GTRANSFORMED_
41 #define EGS_GTRANSFORMED_
48 #ifdef BUILD_GTRANSFORMED_DLL
49 #define EGS_GTRANSFORMED_EXPORT __declspec(dllexport)
51 #define EGS_GTRANSFORMED_EXPORT __declspec(dllimport)
53 #define EGS_GTRANSFORMED_LOCAL
57 #ifdef HAVE_VISIBILITY
58 #define EGS_GTRANSFORMED_EXPORT __attribute__ ((visibility ("default")))
59 #define EGS_GTRANSFORMED_LOCAL __attribute__ ((visibility ("hidden")))
61 #define EGS_GTRANSFORMED_EXPORT
62 #define EGS_GTRANSFORMED_LOCAL
193 int medium(
int ireg)
const {
202 EGS_Float &t,
int *newmed=0,
EGS_Vector *normal=0) {
206 int inew = g->
howfar(ireg,xt,ut,t,newmed,normal);
208 if (inew != ireg && normal) {
224 g->getNextGeom(rndm);
228 void updatePosition(EGS_Float time) {
231 g->updatePosition(time);
234 void containsDynamic(
bool &hasdynamic) {
238 g->containsDynamic(hasdynamic);
268 const string &
getType()
const {
282 void setBScaling(
int start,
int end, EGS_Float bf);
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual int computeIntersections(int ireg, int n, const EGS_Vector &x, const EGS_Vector &u, EGS_GeometryIntersections *isections)
Calculates intersection distances to region boundaries.
virtual EGS_Float hownear(int ireg, const EGS_Vector &x)=0
Calculate the distance to a boundary for position x in any direction.
virtual int inside(const EGS_Vector &x)=0
Returns the region index, if inside, or -1 if outside (obsolete)
int deref()
Decrease the reference count to this geometry.
virtual bool hasBooleanProperty(int ireg, EGS_BPType prop) const
Is the boolean property prop set for region ireg ?
virtual EGS_Float howfarToOutside(int ireg, const EGS_Vector &x, const EGS_Vector &u)
virtual EGS_Float getBScaling(int ireg) const
Get the B field scaling factor in region ireg.
virtual void setBScaling(int start, int end, EGS_Float bf)
Set the B field scaling factor in regions.
void setMedia(EGS_Input *inp)
Set the media in the geometry from the input pointed to by inp.
virtual const string & getType() const =0
Get the geometry type.
virtual void getLabelRegions(const string &str, vector< int > ®s)
Get the list of all regions labeled with str.
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.
bool hasBScaling() const
Does this geometry object have a B field scaling feature?
virtual bool isRealRegion(int ireg) const
Returnes true if ireg is a real region, false otherwise.
virtual bool isInside(const EGS_Vector &x)=0
Is the position x inside the geometry?
virtual EGS_Float getRelativeRho(int ireg) const
Get the relative mass density in region ireg.
bool isConvex() const
Is the geometry convex?
virtual void setBooleanProperty(EGS_BPType prop)
Set the boolean properties of the entire geometry to prop.
virtual int getMaxStep() const
Returns the maximum number of steps through the geometry.
bool hasRhoScaling() const
Does this geometry object have a mass density scaling feature?
virtual int medium(int ireg) const
Returns the medium index in region ireg.
int regions() const
Returns the number of local regions in this geometry.
virtual void setRelativeRho(int start, int end, EGS_Float rho)
Set the relative mass density in regions.
virtual void addBooleanProperty(int bit)
Add a boolean property for the entire geometry by setting the bit'th bit.
virtual int isWhere(const EGS_Vector &x)=0
In which region is poisition x?
Base random number generator class. All random number generators should be derived from this class.
A class representing 3D vectors.
EGS_BaseGeometry class header file.