37 #ifndef EGS_GAUSSIAN_SHAPE_
38 #define EGS_GAUSSIAN_SHAPE_
45 #ifdef BUILD_GAUSSIAN_SHAPE_DLL
46 #define EGS_GAUSSIAN_SHAPE_EXPORT __declspec(dllexport)
48 #define EGS_GAUSSIAN_SHAPE_EXPORT __declspec(dllimport)
50 #define EGS_GAUSSIAN_SHAPE_LOCAL
54 #ifdef HAVE_VISIBILITY
55 #define EGS_GAUSSIAN_SHAPE_EXPORT __attribute__ ((visibility ("default")))
56 #define EGS_GAUSSIAN_SHAPE_LOCAL __attribute__ ((visibility ("hidden")))
58 #define EGS_GAUSSIAN_SHAPE_EXPORT
59 #define EGS_GAUSSIAN_SHAPE_LOCAL
94 EGS_BaseShape(Name,f), shape(Shape), sig_x(sx), sig_y(sy), sig_z(sz) {
97 otype = shape->getObjectType();
98 otype +=
"with Gaussian ditribution";
100 sig_x = -sig_x*0.4246609;
103 sig_y = -sig_y*0.4246609;
106 sig_z = -sig_z*0.4246609;
110 otype =
"Invalid GaussianShape";
137 EGS_Float d2i = 1/u.length2(), di = sqrt(d2i);
148 EGS_Float sig_x, sig_y, sig_z;
A class representing 3D vectors.
static void deleteObject(EGS_Object *o)
Delete an object.
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...
virtual bool supportsDirectionMethod() const
EGS_RandomGenerator class header file.
virtual void getPointSourceDirection(const EGS_Vector &xo, EGS_RandomGenerator *rndm, EGS_Vector &u, EGS_Float &wt)
EGS_BaseShape and shape classes header file.
EGS_Float getGaussian()
Returns a Gaussian distributed random number with mean zero and standard deviation 1...
EGS_BaseShape(const string &Name="", EGS_ObjectFactory *f=0)
Construct a shape named Name.