|
GOAT (Geometrical optics application tool) 0.1
|
This class provides a lens with spherical surfaces The lens consists of two side surfaces and one lateral surface. The properties of the lens is described in the structure lp Each side surface can either be convex, concave or flat. The center of the lens is situate in the center between the to side surfaces. The distance between this surfaces is the offset parameter in lp. Left side (convex): More...
#include <sphericLens.h>
Public Member Functions | |
| void | binRead (std::ifstream &is) |
| binary reading from file | |
| void | binWrite (std::ofstream &os) |
| binary writing to file | |
| maths::Vector< double > | calcCoM () |
| calculates center of mass (needed by setCenter2CoM () ) | |
| lensParms | getParms () |
| not yet implemented | |
| void | initQuad () |
| calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations) | |
| bool | isInside (const maths::Vector< double > &p) |
| not yet implemented | |
| bool | next (const maths::Vector< double > &p, const maths::Vector< double > &k, maths::Vector< double > &pout) |
| returns the next intersection point of a ray with this object The ray is desribed by the starting point of the ray p and the directional vector k (which is assumed to be normalized). Here, the current normal to the surface at the intersection point is calculated (which can be read by the norm() function. The function returns true if there is an intersection point | |
| maths::Vector< double > | norm (const maths::Vector< double > &P) |
| returns surface normal at P The arbitrary calculation of the normal at P is complex and time consuming, therefore P is used here as a dummy variable. It is assumed, that before calling norm, the next() routine was used. The routine returns the value of the normal at the last hit point calculated by next() | |
| void | scale (double sf) |
| void | setParms (lensParms &lp) |
| set the lens parameter | |
| void | setPos (double x, double y, double z) |
| set the position of the lens | |
| void | setPos (maths::Vector< double > r) |
| set the position of the lens | |
| void | setr0 (double r0) |
| defines the radius of the calculation sphere | |
| sphericLens (const maths::Vector< double > &P, std::complex< double > n, lensParms lp, GOAT::maths::Matrix< std::complex< double > > alpha=maths::CUNITY, const maths::Vector< double > &Ex=maths::ex, const maths::Vector< double > &Ey=maths::ey, const maths::Vector< double > &Ez=maths::ez, const int type=OBJECTSHAPE_SPHERIC_LENS) | |
| double | volume () |
| calculates the volume of the lens | |
| Public Member Functions inherited from GOAT::raytracing::ObjectShape | |
| 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) | |
| bool | isActive () |
| returns true if the object should be considered for inelastic calculation | |
| bool | isOutsideWorld () |
| Test if bounding box is (partly) outside the calculation space. | |
| 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 | |
| void | setVisible (bool visible) |
| set visiblity (used in GOATvis) | |
| int | Type () |
| returns the object's type | |
Private Member Functions | |
| void | init () |
Private Attributes | |
| maths::Vector< double > | currentnorm |
| lensParms | lp |
Additional Inherited Members | |
| Public Attributes inherited from GOAT::raytracing::ObjectShape | |
| 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 |
This class provides a lens with spherical surfaces The lens consists of two side surfaces and one lateral surface. The properties of the lens is described in the structure lp Each side surface can either be convex, concave or flat. The center of the lens is situate in the center between the to side surfaces. The distance between this surfaces is the offset parameter in lp. Left side (convex):
Left side (concave):
Left side (convex):
Right side (concave):
Definition at line 27 of file sphericLens.h.
| GOAT::raytracing::sphericLens::sphericLens | ( | const maths::Vector< double > & | P, |
| std::complex< double > | n, | ||
| lensParms | lp, | ||
| GOAT::maths::Matrix< std::complex< double > > | alpha = maths::CUNITY, | ||
| const maths::Vector< double > & | Ex = maths::ex, | ||
| const maths::Vector< double > & | Ey = maths::ey, | ||
| const maths::Vector< double > & | Ez = maths::ez, | ||
| const int | type = OBJECTSHAPE_SPHERIC_LENS ) |
|
virtual |
binary reading from file
Implements GOAT::raytracing::ObjectShape.
|
virtual |
binary writing to file
Implements GOAT::raytracing::ObjectShape.
|
inlinevirtual |
calculates center of mass (needed by setCenter2CoM () )
Implements GOAT::raytracing::ObjectShape.
Definition at line 70 of file sphericLens.h.
|
inline |
not yet implemented
returns the parameters, which describe the lens
Definition at line 71 of file sphericLens.h.
|
private |
|
virtual |
calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations)
Implements GOAT::raytracing::ObjectShape.
|
inlinevirtual |
not yet implemented
Implements GOAT::raytracing::ObjectShape.
Definition at line 62 of file sphericLens.h.
|
virtual |
returns the next intersection point of a ray with this object The ray is desribed by the starting point of the ray p and the directional vector k (which is assumed to be normalized). Here, the current normal to the surface at the intersection point is calculated (which can be read by the norm() function. The function returns true if there is an intersection point
Implements GOAT::raytracing::ObjectShape.
|
inlinevirtual |
returns surface normal at P The arbitrary calculation of the normal at P is complex and time consuming, therefore P is used here as a dummy variable. It is assumed, that before calling norm, the next() routine was used. The routine returns the value of the normal at the last hit point calculated by next()
Implements GOAT::raytracing::ObjectShape.
Definition at line 52 of file sphericLens.h.
| void GOAT::raytracing::sphericLens::scale | ( | double | sf | ) |
|
inline |
set the lens parameter
Definition at line 68 of file sphericLens.h.
|
virtual |
set the position of the lens
Implements GOAT::raytracing::ObjectShape.
|
virtual |
set the position of the lens
Implements GOAT::raytracing::ObjectShape.
|
virtual |
defines the radius of the calculation sphere
Implements GOAT::raytracing::ObjectShape.
|
virtual |
calculates the volume of the lens
Implements GOAT::raytracing::ObjectShape.
|
private |
Definition at line 77 of file sphericLens.h.
|
private |
Definition at line 76 of file sphericLens.h.