46 static bool EGS_GTRANSFORMED_LOCAL inputSet =
false;
49 egsWarning(
"EGS_TransformedGeometry::setMedia: don't use this method. Use the\n"
50 " setMedia() methods of the geometry objects that make up this geometry\n");
53 void EGS_TransformedGeometry::setRelativeRho(
int start,
int end, EGS_Float rho) {
57 void EGS_TransformedGeometry::setRelativeRho(
EGS_Input *) {
58 egsWarning(
"EGS_TransformedGeometry::setRelativeRho(): don't use this "
59 "method. Use the \n setRelativeRho() methods of the underlying "
63 void EGS_TransformedGeometry::setBScaling(
int start,
int end, EGS_Float rho) {
67 void EGS_TransformedGeometry::setBScaling(
EGS_Input *) {
68 egsWarning(
"EGS_TransformedGeometry::setBScaling(): don't use this "
69 "method. Use the \n setBScaling() methods of the underlying "
75 static void setInputs() {
78 setBaseGeometryInputs(
false);
80 geomBlockInput->getSingleInput(
"library")->setValues({
"egs_gtransformed"});
83 geomBlockInput->addSingleInput(
"my geometry",
true,
"The name of a previously defined geometry");
85 addTransformationBlock(geomBlockInput);
88 EGS_GTRANSFORMED_EXPORT
string getExample() {
92 # Example of egs_gtransformed
95 library = egs_gtransformed
97 # geometry geom must be defined before this one
98 :start transformation:
101 :stop transformation:
107 EGS_GTRANSFORMED_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
111 return geomBlockInput;
121 egsWarning(
"createGeometry(gtransformed): got a null pointer"
122 " as a geometry?\n");
128 int err = input->
getInput(
"my geometry",gname);
131 "createGeometry(gtransformed): my geometry must be defined\n"
132 " either inline or using 'my geometry = some_name'\n");
137 egsWarning(
"createGeometry(gtransformed): no geometry named %s"
138 " is defined\n",gname.c_str());
146 egsWarning(
"createGeometry(gtransformed): null transformation."
147 " I hope you know what you are doing\n");
152 "unity transformation. I hope you know what you are doing\n");
163 int EGS_TransformedGeometry::getGlobalRegionOffset(
const string geomName) {
167 void EGS_TransformedGeometry::getLabelRegions(
const string &str, vector<int> ®s,
bool sanitize) {
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
virtual int getGlobalRegionOffset(const string geomName)
Get the global region number for the first region in the geometry.
static EGS_BaseGeometry * createSingleGeometry(EGS_Input *inp)
Create a single geometry from the input inp.
void setName(EGS_Input *inp)
Set the name of the geometry from the input inp.
int setLabels(EGS_Input *input)
Set the labels from an input block.
int ref()
Increase the reference count to this geometry.
static EGS_BaseGeometry * getGeometry(const string &Name)
Get a pointer to the geometry named Name.
void setBoundaryTolerance(EGS_Input *inp)
Set the value of the boundary tolerance from the input inp.
virtual void getLabelRegions(const string &str, vector< int > ®s, bool sanitize=true)
Get the list of all regions labeled with str.
Global egspp functions header file.
EGS_GLIB_EXPORT EGS_BaseGeometry * createGeometry(EGS_Input *input)
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.