|
GOAT (Geometrical optics application tool) 0.1
|
Abstract base class for all volume objects This abstract class provides a template for all volume objects. The refractive index is complex to be able to consider absorption. More...
#include <objectshape.h>
Public Member Functions | |
| virtual void | binRead (std::ifstream &os)=0 |
| binary reading from file | |
| virtual void | binWrite (std::ofstream &os)=0 |
| binary writing to file | |
| virtual maths::Vector< double > | calcCoM ()=0 |
| calculates center of mass (needed by setCenter2CoM () ) | |
| std::complex< double > | getn () |
| returns refractive index for inelastic (RRT) calculation | |
| std::complex< double > | getninel () |
| returns refractive index | |
| bool | getVisible () |
| show the visiblity state (used in GOATvis) | |
| virtual void | initQuad ()=0 |
| calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations) | |
| bool | isActive () |
| returns true if the object should be considered for inelastic calculation | |
| virtual bool | isInside (const maths::Vector< double > &p)=0 |
| checks if point P is inside the object | |
| bool | isOutsideWorld () |
| Test if bounding box is (partly) outside the calculation space. | |
| virtual bool | next (const maths::Vector< double > &p, const maths::Vector< double > &k, maths::Vector< double > &pout)=0 |
| searches for the next (nearest) intersection of a ray with the object, p: current position of the ray, k: direction of the ray, pout: position of the crossing point. Returns true, if a crossing point was found. | |
| virtual maths::Vector< double > | norm (const maths::Vector< double > &P)=0 |
| surface normal at the point P | |
| ObjectShape () | |
| ObjectShape (const maths::Vector< double > &P, std::complex< double > n, GOAT::maths::Matrix< std::complex< double > > alpha, const maths::Vector< double > &Ex=maths::ex, const maths::Vector< double > &Ey=maths::ey, const maths::Vector< double > &Ez=maths::ez, const int type=-1) | |
| Constructor, as template for all derived classes. | |
| ObjectShape (const ObjectShape &F) | |
| void | rotate (maths::Vector< double > A, double phi) |
| sets the matrix for the transformation between object's coordinate system and outer coordinate system, A: rotation axis, phi: angle for rotation around A | |
| void | scale (double sf) |
| sets scaling of the shape by the factor sf | |
| void | setActive (bool active) |
| sets flag if the object is inelastic active, i.e. it will be considered for inelastic calculation | |
| void | setAlpha (double Alpha) |
| sets rotation angle around x-axis | |
| void | setBeta (double Beta) |
| sets rotation angle around y-axis | |
| void | setCenter (maths::Vector< double > P) |
| sets Center to P (check, if function is necessary) | |
| void | setCenter2CoM () |
| Calculates the center of mass (CoM) and sets the object's reference point to the CoM. | |
| void | setGamma (double Gamma) |
| sets rotation angle around z-axis | |
| void | setMatrix (double alpha, double beta, double gamma) |
| sets the matrix for the transformation between object's coordinate system and outer coordinate system, alpha, beta, gamma: angles (rotation around x-, y- and z-axis) to calculate transformation matrix | |
| void | setMatrix (maths::Matrix< double > H) |
| sets the matrix for the transformation between object's coordinate system and outer coordinate system, H: transformation matrix | |
| void | setn (std::complex< double > n) |
| sets refractive index | |
| void | setninel (std::complex< double > ninel) |
| sets refractive index for inelastic (RRT) calculation | |
| void | setPolMatrix (maths::Matrix< std::complex< double > >alpha) |
| sets polarisability matrix | |
| virtual void | setPos (double x, double y, double z)=0 |
| sets reference point P | |
| virtual void | setPos (maths::Vector< double > r)=0 |
| sets reference point P | |
| virtual void | setr0 (double r0)=0 |
| defines the radius of the calculation sphere | |
| void | setVisible (bool visible) |
| set visiblity (used in GOATvis) | |
| int | Type () |
| returns the object's type | |
| virtual double | volume ()=0 |
| returns the volume of the object | |
Public Attributes | |
| bool | Active |
| should the object be considered for inelastic (RRT) calculations? | |
| maths::Matrix< std::complex< double > > | alpha |
| polarisability matrix | |
| maths::Vector< double > | e [3] |
| unity vectors, describing the directions of the local coordinate system | |
| double | Ealpha |
| double | Ebeta |
| double | Egamma |
| angles through which the object was rotated (around the x- (Ealpha), then the y- (Ebeta) and finally the z-axis (Egamma)) | |
| maths::Matrix< double > | H |
| std::complex< double > | n |
| refractive index of the object | |
| std::function< std::complex< double >(double)> | nfunc |
| NFUNCTYPE | nfuncType =NFUNCTYPE::vacuum |
| std::complex< double > | ninel |
| refractive index of the object, used for inelastic (RRT) calculation | |
| maths::Vector< double > | P |
| position of the object | |
| maths::Vector< double > | por |
| corners of the circumferent cuboid (lower left corner and upper right corner) | |
| maths::Vector< double > | pul |
| maths::Matrix< double > | R |
| matrices for the transformation in the local coordinate system (H) and back to the calculation system (R) | |
| double | r0 |
| radius of the calculation sphere | |
| double | rho |
| mass density in \( kg/m^3 \) | |
| double | sf =1 |
| scaling factor, it is used to scale the shape of the object | |
| int | type |
| type of the object | |
| bool | visible =true |
Abstract base class for all volume objects This abstract class provides a template for all volume objects. The refractive index is complex to be able to consider absorption.
Definition at line 60 of file objectshape.h.
| GOAT::raytracing::ObjectShape::ObjectShape | ( | ) |
| GOAT::raytracing::ObjectShape::ObjectShape | ( | const ObjectShape & | F | ) |
| GOAT::raytracing::ObjectShape::ObjectShape | ( | const maths::Vector< double > & | P, |
| std::complex< double > | n, | ||
| GOAT::maths::Matrix< std::complex< double > > | alpha, | ||
| const maths::Vector< double > & | Ex = maths::ex, | ||
| const maths::Vector< double > & | Ey = maths::ey, | ||
| const maths::Vector< double > & | Ez = maths::ez, | ||
| const int | type = -1 ) |
Constructor, as template for all derived classes.
| P | position of the object (reference point) |
| n | refractive index (complex) @alpha polarizability matrix |
| Ex,Ey,Ez | direction of the object's coordinate system (default values: ex, ey and ez) @type type of the object, defines the shape (default value: -1, no shape) |
|
pure virtual |
binary reading from file
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
pure virtual |
binary writing to file
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
pure virtual |
calculates center of mass (needed by setCenter2CoM () )
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
inline |
returns refractive index for inelastic (RRT) calculation
Definition at line 110 of file objectshape.h.
|
inline |
returns refractive index
Definition at line 109 of file objectshape.h.
|
inline |
show the visiblity state (used in GOATvis)
Definition at line 118 of file objectshape.h.
|
pure virtual |
calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations)
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
inline |
returns true if the object should be considered for inelastic calculation
Definition at line 112 of file objectshape.h.
|
pure virtual |
checks if point P is inside the object
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
| bool GOAT::raytracing::ObjectShape::isOutsideWorld | ( | ) |
Test if bounding box is (partly) outside the calculation space.
|
pure virtual |
searches for the next (nearest) intersection of a ray with the object, p: current position of the ray, k: direction of the ray, pout: position of the crossing point. Returns true, if a crossing point was found.
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
pure virtual |
surface normal at the point P
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
| void GOAT::raytracing::ObjectShape::rotate | ( | maths::Vector< double > | A, |
| double | phi ) |
sets the matrix for the transformation between object's coordinate system and outer coordinate system, A: rotation axis, phi: angle for rotation around A
| void GOAT::raytracing::ObjectShape::scale | ( | double | sf | ) |
sets scaling of the shape by the factor sf
|
inline |
sets flag if the object is inelastic active, i.e. it will be considered for inelastic calculation
Definition at line 113 of file objectshape.h.
|
inline |
sets rotation angle around x-axis
Definition at line 114 of file objectshape.h.
|
inline |
sets rotation angle around y-axis
Definition at line 115 of file objectshape.h.
| void GOAT::raytracing::ObjectShape::setCenter | ( | maths::Vector< double > | P | ) |
sets Center to P (check, if function is necessary)
| void GOAT::raytracing::ObjectShape::setCenter2CoM | ( | ) |
Calculates the center of mass (CoM) and sets the object's reference point to the CoM.
|
inline |
sets rotation angle around z-axis
Definition at line 116 of file objectshape.h.
| void GOAT::raytracing::ObjectShape::setMatrix | ( | double | alpha, |
| double | beta, | ||
| double | gamma ) |
sets the matrix for the transformation between object's coordinate system and outer coordinate system, alpha, beta, gamma: angles (rotation around x-, y- and z-axis) to calculate transformation matrix
| void GOAT::raytracing::ObjectShape::setMatrix | ( | maths::Matrix< double > | H | ) |
sets the matrix for the transformation between object's coordinate system and outer coordinate system, H: transformation matrix
|
inline |
sets refractive index
Definition at line 107 of file objectshape.h.
|
inline |
sets refractive index for inelastic (RRT) calculation
Definition at line 108 of file objectshape.h.
|
inline |
sets polarisability matrix
Definition at line 111 of file objectshape.h.
|
pure virtual |
sets reference point P
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
pure virtual |
sets reference point P
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
pure virtual |
defines the radius of the calculation sphere
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
|
inline |
set visiblity (used in GOATvis)
Definition at line 117 of file objectshape.h.
|
inline |
returns the object's type
Definition at line 97 of file objectshape.h.
|
pure virtual |
returns the volume of the object
Implemented in GOAT::raytracing::asphericLens, GOAT::raytracing::Box, GOAT::raytracing::Cone, GOAT::raytracing::Cylinder, GOAT::raytracing::Ellipsoid, GOAT::raytracing::sphericLens, GOAT::raytracing::surface, and GOAT::raytracing::VortexPlate.
| bool GOAT::raytracing::ObjectShape::Active |
should the object be considered for inelastic (RRT) calculations?
Definition at line 130 of file objectshape.h.
| maths::Matrix<std::complex<double> > GOAT::raytracing::ObjectShape::alpha |
polarisability matrix
Definition at line 123 of file objectshape.h.
| maths::Vector<double> GOAT::raytracing::ObjectShape::e[3] |
unity vectors, describing the directions of the local coordinate system
Definition at line 126 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::Ealpha |
Definition at line 127 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::Ebeta |
Definition at line 127 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::Egamma |
angles through which the object was rotated (around the x- (Ealpha), then the y- (Ebeta) and finally the z-axis (Egamma))
Definition at line 127 of file objectshape.h.
| maths::Matrix<double> GOAT::raytracing::ObjectShape::H |
Definition at line 120 of file objectshape.h.
| std::complex<double> GOAT::raytracing::ObjectShape::n |
refractive index of the object
Definition at line 121 of file objectshape.h.
| std::function<std::complex<double>(double)> GOAT::raytracing::ObjectShape::nfunc |
Definition at line 138 of file objectshape.h.
| NFUNCTYPE GOAT::raytracing::ObjectShape::nfuncType =NFUNCTYPE::vacuum |
Definition at line 139 of file objectshape.h.
| std::complex<double> GOAT::raytracing::ObjectShape::ninel |
refractive index of the object, used for inelastic (RRT) calculation
Definition at line 122 of file objectshape.h.
| maths::Vector<double> GOAT::raytracing::ObjectShape::P |
position of the object
Definition at line 119 of file objectshape.h.
| maths::Vector<double> GOAT::raytracing::ObjectShape::por |
corners of the circumferent cuboid (lower left corner and upper right corner)
Definition at line 125 of file objectshape.h.
| maths::Vector<double> GOAT::raytracing::ObjectShape::pul |
Definition at line 125 of file objectshape.h.
| maths::Matrix<double> GOAT::raytracing::ObjectShape::R |
matrices for the transformation in the local coordinate system (H) and back to the calculation system (R)
Definition at line 120 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::r0 |
radius of the calculation sphere
Definition at line 128 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::rho |
mass density in \( kg/m^3 \)
Definition at line 131 of file objectshape.h.
| double GOAT::raytracing::ObjectShape::sf =1 |
scaling factor, it is used to scale the shape of the object
Definition at line 129 of file objectshape.h.
| int GOAT::raytracing::ObjectShape::type |
type of the object
Definition at line 124 of file objectshape.h.
| bool GOAT::raytracing::ObjectShape::visible =true |
Definition at line 137 of file objectshape.h.