47 #ifndef EGS_AENVELOPE_GEOMETRY_
48 #define EGS_AENVELOPE_GEOMETRY_
52 #ifdef BUILD_AENVELOPE_DLL
53 #define EGS_AENVELOPE_EXPORT __declspec(dllexport)
55 #define EGS_AENVELOPE_EXPORT __declspec(dllimport)
57 #define EGS_AENVELOPE_LOCAL
61 #ifdef HAVE_VISIBILITY
62 #define EGS_AENVELOPE_EXPORT __attribute__ ((visibility ("default")))
63 #define EGS_AENVELOPE_LOCAL __attribute__ ((visibility ("hidden")))
65 #define EGS_AENVELOPE_EXPORT
66 #define EGS_AENVELOPE_LOCAL
350 geom(geom), transform(transform), vcopts(vcopts) {};
360 const vector<AEnvelopeAux> inscribed,
const string &Name =
"",
bool debug=
false,
string output_vc_file=
"no");
370 int getNRegWithInscribed()
const;
372 bool isRealRegion(
int ireg)
const;
380 int medium(
int ireg)
const;
382 virtual vector<EGS_BaseGeometry *> getGeomsInRegion(
int ireg);
384 int computeIntersections(
int ireg,
int n,
const EGS_Vector &X,
391 EGS_Float &t,
int *newmed = 0,
EGS_Vector *normal = 0);
393 EGS_Float hownear(
int ireg,
const EGS_Vector &x);
395 bool hasBooleanProperty(
int ireg, EGS_BPType prop)
const;
397 void setBooleanProperty(EGS_BPType);
399 void addBooleanProperty(
int);
401 void setBooleanProperty(EGS_BPType,
int,
int,
int step=1);
403 void addBooleanProperty(
int,
int,
int,
int step=1);
405 int getMaxStep()
const;
409 void updatePosition(EGS_Float time);
411 void containsDynamic(
bool &hasdynamic);
413 virtual EGS_Float getVolume(
int ireg);
415 virtual EGS_Float getCorrectionRatio(
int ireg);
417 virtual const string &getType()
const {
421 void printInfo()
const;
423 void setRelativeRho(
int start,
int end, EGS_Float rho);
426 EGS_Float getRelativeRho(
int ireg)
const;
444 static vector<EGS_AffineTransform *> createTransforms(
EGS_Input *inpt);
449 static bool allowedBaseGeomType(
const string &geom_type);
457 vector<volcor::VCOptions *>
opts;
460 int nreg_with_inscribed;
467 map<volcor::GeomRegPairT, int> local_to_global_reg;
468 map<int, volcor::GeomRegPairT> global_reg_to_local;
471 vector<EGS_BaseGeometry *> *geoms_in_region;
475 const static string allowed_base_geom_types[];
483 void setMedia(
EGS_Input *,
int,
const int *);
485 double findRegionsInscribedIn(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
486 double loadFileVolumeCorrections(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
490 void writeVCToFile(ostream &);
491 void writeVolumeCorrection();
495 void setPropertyError(
const char *funcname) {
496 egsFatal(
"EGS_AEnvelope::%s: don't use this method\n Define "
497 "properties in the constituent geometries instead\n",
501 bool getHasRhoScaling();
561 vector<EGS_BaseGeometry *> active_inscribed;
568 vector<EGS_BaseGeometry *> getGeomsInRegion(
int ireg);
573 const vector<AEnvelopeAux> inscribed,
const string &Name =
"",
bool debug=
false,
string output_vc_file=
"no");
575 const string &getType()
const {
581 void setActiveGeometries(vector<EGS_BaseGeometry *> geoms);
585 void setActiveGeometries(vector<int> geom_indexes);
588 bool hasActiveGeom(
int ireg);
591 bool hasInactiveGeom(
int ireg);
594 void setActiveByIndex(
int inscribed_index);
597 void activateByIndex(
int inscribed_index);
600 void deactivateByIndex(
int inscribed_index);
A fast envelope geometry with automatic region detection.
vector< volcor::VCOptions * > opts
The inscribed geometries.
vector< EGS_BaseGeometry * > inscribed_geoms
The inscribed geometries.
static string type
Geometry type.
vector< EGS_AffineTransform * > transforms
The inscribed geometries.
EGS_BaseGeometry * base_geom
The envelope geometry.
int nregbase
Number of regions in the base geometry.
int ninscribed
Number of regions in the base geometry.
This geometry type allows you to activate and deactivate inscribed geometries in custom egspp user co...
static string type
Geometry type.
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
Base random number generator class. All random number generators should be derived from this class.
A class representing 3D vectors.
Volume correction initialization helper class.
EGS_BaseGeometry class header file.
Global egspp functions header file.
EGS_BaseShape and shape classes header file.
EGS_InfoFunction EGS_EXPORT egsFatal
Always use this function for reporting fatal errors.
Region discovery/volume correction for auto envelope geometries.
std::map< int, EGS_I64 > HitCounterT
pair< EGS_BaseGeometry *, int > GeomRegPairT
vector< EGS_Float > applyVolumeCorrections(VCOptions *opts, HitCounterT hit_counter, vector< EGS_Float > uncorrected)
Apply volume corrections to base regions.
A helper class for initializing auto envelopes.
Struct used to collect and output results about a volume correction run.
Region discovery/volume correction functionality for EGS_AEnvelope geometries.