24 namespace raytracing {
25#define OBJECTSHAPE_NO_SHAPE -1
26#define OBJECTSHAPE_ELLIPSOID 10000
27#define OBJECTSHAPE_SURFACE 10001
28#define OBJECTSHAPE_CONE 10002
29#define OBJECTSHAPE_ASPHERIC_LENS 10003
30#define OBJECTSHAPE_SPHERIC_LENS 10004
31#define OBJECTSHAPE_BOX 10005
32#define OBJECTSHAPE_CYLINDER 10006
33#define OBJECTSHAPE_VORTEX_PLATE 10007
37#define SUPERELLIPSOID_D 17
38#define SUPERELLIPSOID 4
44#define SUPERELLIPSOID_N 10
46#define KEGELSTUMPF_HOHL 9
50#define ZYLINDER_HEXAGONAL 16
75 std::complex<double>
n,
85 virtual void binRead(std::ifstream& os) = 0;
105 virtual void setPos(
double x,
double y,
double z) = 0;
107 void setn(std::complex<double>
n) { this->n =
n; }
110 std::complex<double>
getn() {
return n; }
121 std::complex<double>
n;
138 std::function <std::complex<double>(
double)>
nfunc;
This class represents a threedimensional (numeric) Matrix as a template.
Template class for threedimensional vectors.
Abstract base class for all volume objects This abstract class provides a template for all volume obj...
maths::Matrix< double > H
void setMatrix(maths::Matrix< double > H)
sets the matrix for the transformation between object's coordinate system and outer coordinate system...
virtual double volume()=0
returns the volume of the object
double sf
scaling factor, it is used to scale the shape of the object
virtual void binRead(std::ifstream &os)=0
binary reading from file
maths::Vector< double > por
corners of the circumferent cuboid (lower left corner and upper right corner)
int type
type of the object
bool getVisible()
show the visiblity state (used in GOATvis)
bool Active
should the object be considered for inelastic (RRT) calculations?
void setCenter(maths::Vector< double > P)
sets Center to P (check, if function is necessary)
virtual void binWrite(std::ofstream &os)=0
binary writing to file
void setBeta(double Beta)
sets rotation angle around y-axis
double rho
mass density in
void setGamma(double Gamma)
sets rotation angle around z-axis
std::function< std::complex< double >(double)> nfunc
void setVisible(bool visible)
set visiblity (used in GOATvis)
maths::Matrix< std::complex< double > > alpha
polarisability matrix
ObjectShape(const ObjectShape &F)
virtual maths::Vector< double > calcCoM()=0
calculates center of mass (needed by setCenter2CoM () )
maths::Vector< double > pul
std::complex< double > ninel
refractive index of the object, used for inelastic (RRT) calculation
maths::Vector< double > P
position of the object
double Egamma
angles through which the object was rotated (around the x- (Ealpha), then the y- (Ebeta) and finally ...
void scale(double sf)
sets scaling of the shape by the factor sf
virtual bool isInside(const maths::Vector< double > &p)=0
checks if point P is inside the object
virtual void setPos(double x, double y, double z)=0
sets reference point P
void setPolMatrix(maths::Matrix< std::complex< double > >alpha)
sets polarisability matrix
maths::Matrix< double > R
matrices for the transformation in the local coordinate system (H) and back to the calculation system...
bool isOutsideWorld()
Test if bounding box is (partly) outside the calculation space.
virtual void initQuad()=0
calculates the circumferent cuboid (needed e.g. for the inelastic scattering calculations)
virtual void setr0(double r0)=0
defines the radius of the calculation sphere
void setMatrix(double alpha, double beta, double gamma)
sets the matrix for the transformation between object's coordinate system and outer coordinate system...
void rotate(maths::Vector< double > A, double phi)
sets the matrix for the transformation between object's coordinate system and outer coordinate system...
void setActive(bool active)
sets flag if the object is inelastic active, i.e. it will be considered for inelastic calculation
double r0
radius of the calculation sphere
void setAlpha(double Alpha)
sets rotation angle around x-axis
void setn(std::complex< double > n)
sets refractive index
void setninel(std::complex< double > ninel)
sets refractive index for inelastic (RRT) calculation
bool isActive()
returns true if the object should be considered for inelastic calculation
std::complex< double > n
refractive index of the object
std::complex< double > getninel()
returns refractive index
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...
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.
maths::Vector< double > e[3]
unity vectors, describing the directions of the local coordinate system
void setCenter2CoM()
Calculates the center of mass (CoM) and sets the object's reference point to the CoM.
std::complex< double > getn()
returns refractive index for inelastic (RRT) calculation
virtual maths::Vector< double > norm(const maths::Vector< double > &P)=0
surface normal at the point P
virtual void setPos(maths::Vector< double > r)=0
sets reference point P
int Type()
returns the object's type
This file contains the definition of a template for 3x3 matrices, which can be used together with the...
bool intersectionTest(ObjectShape &A, ObjectShape &B)
Test if object A and object B may intersect each other (i.e. the bounding boxes around the objects in...
maths::Matrix< double > computeInertia(ObjectShape *F)
calculates inertia matrix
This class is used for the iray class. This class is intended for internal use only....
This file contains the Vector template class and some useful functions around this class.