45 egsWarning(
"createGeometry(cylinders): null input?\n");
49 int err = input->
getInput(
"type",type);
51 egsWarning(
"createGeometry(cylinders): missing type key\n");
58 err = input->
getInput(
"midpoint",Xo);
59 if (!err && Xo.size() == 3) {
64 vector<EGS_Float> radii;
65 err = input->
getInput(
"radii",radii);
67 egsWarning(
"createGeometry(cylinders): wrong/missing 'radii' input\n");
70 EGS_Float *r=
new EGS_Float [radii.size()];
71 for (
int i=0; i<radii.size(); i++) {
77 if (type ==
"EGS_XCylinders") {
80 else if (type ==
"EGS_YCylinders") {
83 else if (type ==
"EGS_ZCylinders") {
89 if (err || a.size() != 3) {
90 egsWarning(
"createGeometry(cylinders): missing/wrong axis input\n");
93 egsWarning(
"got axis (%g,%g,%g)\n",a[0],a[1],a[2]);
A class representing 3D vectors.
int setLabels(EGS_Input *input)
Set the labels from an input block.
EGS_GLIB_EXPORT EGS_BaseGeometry * createGeometry(EGS_Input *input)
Base geometry class. Every geometry class must be derived from EGS_BaseGeometry.
void setBoundaryTolerance(EGS_Input *inp)
Set the value of the boundary tolerance from the input inp.
void setMedia(EGS_Input *inp)
Set the media in the geometry from the input pointed to by inp.
A projector into any plane.
A set of concentric cylinders.
void setName(EGS_Input *inp)
Set the name of the geometry from the input inp.
A projector into the z-plane.
A projector into the y-plane.
A projector into the x-plane.
A set of concentric cylinders: header.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.