37 #ifndef EGS_LINE_SHAPE_
38 #define EGS_LINE_SHAPE_
46 #ifdef BUILD_LINE_SHAPE_DLL
47 #define EGS_LINE_SHAPE_EXPORT __declspec(dllexport)
49 #define EGS_LINE_SHAPE_EXPORT __declspec(dllimport)
51 #define EGS_LINE_SHAPE_LOCAL
55 #ifdef HAVE_VISIBILITY
56 #define EGS_LINE_SHAPE_EXPORT __attribute__ ((visibility ("default")))
57 #define EGS_LINE_SHAPE_LOCAL __attribute__ ((visibility ("hidden")))
59 #define EGS_LINE_SHAPE_EXPORT
60 #define EGS_LINE_SHAPE_LOCAL
87 EGS_LineShape(
const vector<EGS_Float> &points,
const string &Name=
"",
97 int j = table->sampleBin(rndm);
99 EGS_Float eta1 = 1 - eta;
100 return EGS_Vector(x[j]*eta+x[j+1]*eta1,y[j]*eta+y[j+1]*eta1,0);
EGS_AliasTable class header file.
A class for sampling random values from a given probability distribution using the alias table techni...
A class representing 3D vectors.
Base shape class. All shapes in the EGSnrc C++ class library are derived from EGS_BaseShape.
virtual EGS_Vector getPoint(EGS_RandomGenerator *rndm)
Sample and return a random 3D vector.
Base random number generator class. All random number generators should be derived from this class...
EGS_RandomGenerator class header file.
EGS_BaseShape and shape classes header file.
EGS_Float getUniform()
Returns a random number uniformly distributed between zero (inclusive) and 1 (exclusive).