41 static bool EGS_CIRCLE_PERPENDICULAR_LOCAL inputSet =
false;
42 static shared_ptr<EGS_BlockInput> EGS_CIRCLE_PERPENDICULAR_LOCAL shapeBlockInput = make_shared<EGS_BlockInput>(
"shape");
46 static void setInputs() {
49 setShapeInputs(shapeBlockInput);
50 shapeBlockInput->getSingleInput(
"library")->setValues({
"egs_circle_perpendicular"});
52 shapeBlockInput->addSingleInput(
"radius",
false,
"The radius of the circle.");
53 shapeBlockInput->addSingleInput(
"midpoint",
false,
"The x, y midpoint of the circle, which is in the x-y plane located at z=0. Use an EGS_AffineTransform block to translate or rotate the shape.");
54 shapeBlockInput->addSingleInput(
"inner radius",
false,
"The inner radius, to define a ring. Points will only be sampled within the ring between the 'inner radius' and 'radius'.");
57 EGS_CIRCLE_PERPENDICULAR_EXPORT
string getExample() {
61 library = egs_circle_perpendicular
62 radius = the circle radius
63 midpoint = Ox, Oy (optional)
64 inner radius = the inner radius (optional)
70 EGS_CIRCLE_PERPENDICULAR_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
74 return shapeBlockInput;
80 egsWarning(
"createShape(circle): null input?\n");
84 int err = input->
getInput(
"radius",radius);
86 egsWarning(
"createShape(circle): no 'radius' input\n");
90 err = input->
getInput(
"inner radius",Ro);
94 vector<EGS_Float> pos;
95 err = input->
getInput(
"midpoint",pos);
102 if (pos.size() != 2) {
103 egsWarning(
"createShape(circle): 2 instead of %d inputs expected"
104 " for keyword 'midpoint'. Reseting midpoint to (0,0)\n",
Base shape class. All shapes in the EGSnrc C++ class library are derived from EGS_BaseShape.
void setTransformation(EGS_Input *inp)
Set the transformation attached to this shape.
A circle shape perpendicular to source particles.
void setName(EGS_Input *inp)
Set the name of the object from the information provided by inp.
A circular shape perpendicular to source particles.
Global egspp functions header file.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.