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 bool hasRhoScaling()
override;
415 void finishInitialization()
override;
417 virtual EGS_Float getVolume(
int ireg);
419 virtual EGS_Float getCorrectionRatio(
int ireg);
421 virtual const string &getType()
const {
425 void printInfo()
const;
427 void setRelativeRho(
int start,
int end, EGS_Float rho);
430 EGS_Float getRelativeRho(
int ireg)
const;
459 vector<EGS_BaseGeometry *> inscribed_geoms;
460 vector<EGS_AffineTransform *> transforms;
461 vector<volcor::VCOptions *> opts;
464 int nreg_with_inscribed;
471 map<volcor::GeomRegPairT, int> local_to_global_reg;
472 map<int, volcor::GeomRegPairT> global_reg_to_local;
475 vector<EGS_BaseGeometry *> *geoms_in_region;
479 const static string allowed_base_geom_types[];
489 double findRegionsInscribedIn(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
490 double loadFileVolumeCorrections(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
494 void writeVCToFile(ostream &);
495 void writeVolumeCorrection();
499 void setPropertyError(
const char *funcname) {
500 egsFatal(
"EGS_AEnvelope::%s: don't use this method\n Define "
501 "properties in the constituent geometries instead\n",
505 bool getHasRhoScaling();
565 vector<EGS_BaseGeometry *> active_inscribed;
572 vector<EGS_BaseGeometry *> getGeomsInRegion(
int ireg);
577 const vector<AEnvelopeAux> inscribed,
const string &Name =
"",
bool debug=
false,
string output_vc_file=
"no");
579 const string &getType()
const {
A fast envelope geometry with automatic region detection.
static vector< EGS_AffineTransform * > createTransforms(EGS_Input *inpt)
Take a block of transformations and return vector of EGS_AffineTransforms.
static bool allowedBaseGeomType(const string &geom_type)
function for checking whether a given geometry type is allowed to be used as a base geometry
void setMedia(EGS_Input *, int, const int *)
Don't set media for an envelope geometry.
This geometry type allows you to activate and deactivate inscribed geometries in custom egspp user co...
void deactivateByIndex(int inscribed_index)
bool hasInactiveGeom(int ireg)
void activateByIndex(int inscribed_index)
void setActiveGeometries(vector< EGS_BaseGeometry * > geoms)
void setActiveByIndex(int inscribed_index)
void setActiveGeometries(vector< int > geom_indexes)
bool hasActiveGeom(int ireg)
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.