EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Public Member Functions | Protected Attributes | List of all members
EGS_RectangleShape Class Reference

A rectangular shape. More...

#include <egs_rectangle.h>

Inheritance diagram for EGS_RectangleShape:
EGS_SurfaceShape EGS_BaseShape EGS_Object

Public Member Functions

 EGS_RectangleShape (EGS_Float Xmin, EGS_Float Xmax, EGS_Float Ymin, EGS_Float Ymax, const string &Name="", EGS_ObjectFactory *f=0)
 
EGS_Vector getPoint (EGS_RandomGenerator *rndm)
 
- Public Member Functions inherited from EGS_SurfaceShape
 EGS_SurfaceShape (const string &Name="", EGS_ObjectFactory *f=0)
 Construct a surface shape named Name.
 
 ~EGS_SurfaceShape ()
 Destructor. Does nothing.
 
bool supportsDirectionMethod () const
 Always returns true. Shapes derived from this class must implement the getPoint() method to return points on a given surface.
 
EGS_Float area () const
 Returns the area of this surface shape.
 
void getPointSourceDirection (const EGS_Vector &Xo, EGS_RandomGenerator *rndm, EGS_Vector &u, EGS_Float &wt)
 Get a random direction given a source position Xo. More...
 
- Public Member Functions inherited from EGS_BaseShape
 EGS_BaseShape (const string &Name="", EGS_ObjectFactory *f=0)
 Construct a shape named Name.
 
virtual ~EGS_BaseShape ()
 Destructor. Deletes T if it is not null.
 
virtual EGS_Vector getRandomPoint (EGS_RandomGenerator *rndm)
 Returns a random 3D vector. More...
 
void setTransformation (EGS_Input *inp)
 Set the transformation attached to this shape. More...
 
void setTransformation (EGS_AffineTransform *t)
 Set the transformation attached to this shape. More...
 
const EGS_AffineTransformgetTransform () const
 Get a pointer to the affine transformation attached to this shape.
 
- Public Member Functions inherited from EGS_Object
 EGS_Object (const string &Name="", EGS_ObjectFactory *f=0)
 Create an EGS_Object named Name belonging to the object factory f. More...
 
 EGS_Object (EGS_Input *inp, EGS_ObjectFactory *f=0)
 Create an EGS_Object from the information pointed to by inp that belongs to object factory f. More...
 
const string & getObjectName () const
 Get the object name.
 
void setObjectName (const string &Name)
 Set the object name to Name.
 
const string & getObjectType () const
 Get the object type.
 
virtual EGS_ObjectcreateObject (EGS_Input *inp)
 Create an object from the infromation pointed to by inp. More...
 
void setName (EGS_Input *inp)
 Set the name of the object from the information provided by inp. More...
 
int ref ()
 Increase the reference count to this object.
 
int deref ()
 Decrease the reference count to this object.
 
void setFactory (EGS_ObjectFactory *f)
 Set the factory to which the object belongs. More...
 

Protected Attributes

EGS_Float xmin
 
EGS_Float xmax
 
EGS_Float ymin
 
EGS_Float ymax
 
EGS_Float dx
 
EGS_Float dy
 
- Protected Attributes inherited from EGS_SurfaceShape
EGS_Float A
 
- Protected Attributes inherited from EGS_BaseShape
EGS_AffineTransformT
 The affine transformation attached to the shape.
 
- Protected Attributes inherited from EGS_Object
string name
 The object name.
 
string otype
 The object type.
 
int nref
 Number of references to the object.
 
EGS_ObjectFactoryfactory
 The factory this object belongs to.
 

Additional Inherited Members

- Static Public Member Functions inherited from EGS_BaseShape
static EGS_BaseShapecreateShape (EGS_Input *inp)
 Create a shape from the information pointed to by inp. More...
 
static EGS_BaseShapegetShape (const string &Name)
 Get a pointer to the shape named Name. More...
 
- Static Public Member Functions inherited from EGS_Object
static string getUniqueName (const EGS_Object *o=0)
 Create and return a unique object name. More...
 
static void deleteObject (EGS_Object *o)
 Delete an object. More...
 

Detailed Description

A rectangular shape.

A rectangular shape is defined via

:start shape:
    library = egs_rectangle
    rectangle = x1 y1 x2 y2
    inner rectangle = xp1 yp1 xp2 yp2 (optional)
:stop shape:

If the optional inner rectangle input is missing, the points will be uniformly distributed in the rectangle with the left-upper corner x1,y1 and the right-lower corner x2,y2. If the inner rectangle key is present, xp1,yp1 and xp2,yp2 are the left-upper corner and right-lower corner of the inner rectangle so that the points will be distributed within the ``rectangular ring'' defined by the two rectangles. In this later case the actual object being constructed will be of type EGS_RectangularRing.

Definition at line 87 of file egs_rectangle.h.


The documentation for this class was generated from the following file: