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;
448 static vector<EGS_AffineTransform *> createTransforms(
EGS_Input *inpt);
453 static bool allowedBaseGeomType(
const string &geom_type);
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[];
487 void setMedia(
EGS_Input *,
int,
const int *);
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 {
585 void setActiveGeometries(vector<EGS_BaseGeometry *> geoms);
589 void setActiveGeometries(vector<int> geom_indexes);
592 bool hasActiveGeom(
int ireg);
595 bool hasInactiveGeom(
int ireg);
598 void setActiveByIndex(
int inscribed_index);
601 void activateByIndex(
int inscribed_index);
604 void deactivateByIndex(
int inscribed_index);
A fast envelope geometry with automatic region detection.
vector< EGS_BaseGeometry * > inscribed_geoms
The inscribed geometries.
vector< EGS_AffineTransform * > transforms
The inscribed geometries.
static string type
Geometry type.
int nregbase
Number of regions in the base geometry.
EGS_BaseGeometry * base_geom
The envelope geometry.
int ninscribed
Number of regions in the base geometry.
vector< volcor::VCOptions * > opts
The inscribed geometries.
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.