46 #ifndef EGS_AENVELOPE_GEOMETRY_
47 #define EGS_AENVELOPE_GEOMETRY_
51 #ifdef BUILD_AENVELOPE_DLL
52 #define EGS_AENVELOPE_EXPORT __declspec(dllexport)
54 #define EGS_AENVELOPE_EXPORT __declspec(dllimport)
56 #define EGS_AENVELOPE_LOCAL
60 #ifdef HAVE_VISIBILITY
61 #define EGS_AENVELOPE_EXPORT __attribute__ ((visibility ("default")))
62 #define EGS_AENVELOPE_LOCAL __attribute__ ((visibility ("hidden")))
64 #define EGS_AENVELOPE_EXPORT
65 #define EGS_AENVELOPE_LOCAL
349 geom(geom), transform(transform), vcopts(vcopts) {};
359 const vector<AEnvelopeAux> inscribed,
const string &Name =
"",
bool debug=
false,
string output_vc_file=
"no");
369 int getNRegWithInscribed()
const;
371 bool isRealRegion(
int ireg)
const;
379 int medium(
int ireg)
const;
381 virtual vector<EGS_BaseGeometry *> getGeomsInRegion(
int ireg);
383 int computeIntersections(
int ireg,
int n,
const EGS_Vector &X,
390 EGS_Float &t,
int *newmed = 0,
EGS_Vector *normal = 0);
392 EGS_Float hownear(
int ireg,
const EGS_Vector &x);
394 bool hasBooleanProperty(
int ireg, EGS_BPType prop)
const;
396 void setBooleanProperty(EGS_BPType);
398 void addBooleanProperty(
int);
400 void setBooleanProperty(EGS_BPType,
int,
int,
int step=1);
402 void addBooleanProperty(
int,
int,
int,
int step=1);
404 int getMaxStep()
const;
406 virtual EGS_Float getVolume(
int ireg);
408 virtual EGS_Float getCorrectionRatio(
int ireg);
410 virtual const string &getType()
const {
414 void printInfo()
const;
416 void setRelativeRho(
int start,
int end, EGS_Float rho);
419 EGS_Float getRelativeRho(
int ireg)
const;
448 vector<EGS_BaseGeometry *> inscribed_geoms;
449 vector<EGS_AffineTransform *> transforms;
450 vector<volcor::VCOptions *> opts;
453 int nreg_with_inscribed;
460 map<volcor::GeomRegPairT, int> local_to_global_reg;
461 map<int, volcor::GeomRegPairT> global_reg_to_local;
464 vector<EGS_BaseGeometry *> *geoms_in_region;
468 const static string allowed_base_geom_types[];
478 double findRegionsInscribedIn(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
479 double loadFileVolumeCorrections(vector<EGS_BaseGeometry *>, vector<EGS_AffineTransform *>,
volcor::VCOptions *);
483 void writeVCToFile(ostream &);
484 void writeVolumeCorrection();
488 void setPropertyError(
const char *funcname) {
489 egsFatal(
"EGS_AEnvelope::%s: don't use this method\n Define "
490 "properties in the constituent geometries instead\n",
494 bool getHasRhoScaling();
554 vector<EGS_BaseGeometry *> active_inscribed;
561 vector<EGS_BaseGeometry *> getGeomsInRegion(
int ireg);
566 const vector<AEnvelopeAux> inscribed,
const string &Name =
"",
bool debug=
false,
string output_vc_file=
"no");
568 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.
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.