41 std::complex<double>
n,
This class represents a threedimensional (numeric) Matrix as a template.
Template class for threedimensional vectors.
class which represents a box (cuboid). It is derived by class ObjectShape This class is mainly used f...
void binWrite(std::ofstream &os)
writes object to a binary file
bool next(const maths::Vector< double > &p, const maths::Vector< double > &k, maths::Vector< double > &pout)
calculates the next crossing point between a ray represented by the position
Box(const Box &B)
copy constructor
double distance(const maths::Vector< double > &p, const maths::Vector< double > &k)
calculates the distance between a ray, described by the position vector p and its directional vector ...
void setPos(double x, double y, double z)
sets the position P and the corresponding bounds
Box(const maths::Vector< double > &P, const maths::Vector< double > &d, std::complex< double > n, double r0=1.0, const 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)
void scale(double sf)
sets scaling factor
bool isOctree
used for Octree calculation
maths::Vector< double > bounds[2]
positions of the two opposite corners (with box in the center)
void binRead(std::ifstream &is)
reads object from a binary file
Box(const ObjectShape &F)
maths::Vector< double > d
extensions of the box in x-, y- and z-direction
Box(const maths::Vector< double > bound0, const maths::Vector< double > bound1)
maths::Vector< double > getD() const
getthe Size of the box as a vector with its edge lenghts
void initQuad()
calculates the circumferent cuboid
bool isInside(const maths::Vector< double > &Ps)
returns true, if Ps is inside the box
maths::Vector< double > norm(const maths::Vector< double > &p)
normal vector at the position p
void setPos(maths::Vector< double > r)
sets reference point P
void setr0(double r0)
sets the radius of the calculation sphere
maths::Vector< double > calcCoM()
calculates center of mass (needed by setCenter2CoM () )
double getSize()
returns a vector with the side lengths as its components
double volume()
returns the volume of the box
void setOctree(bool isOctree)
box belongs to an octree calculation
void setD(maths::Vector< double > D)
maths::Vector< double > diag[3]
diagonal
double sf
scaling factor, it is used to scale the shape of the object
maths::Vector< double > por
corners of the circumferent cuboid (lower left corner and upper right corner)
maths::Matrix< std::complex< double > > alpha
polarisability matrix
maths::Vector< double > pul
maths::Vector< double > P
position of the object
double r0
radius of the calculation sphere
std::complex< double > n
refractive index of the object
const Matrix< std::complex< double > > CUNITY
Unity matrix (complex-valued)
Raytracer used for ultrashort pulse calculation with raytracing only.
double abs2(double x)
returns the squared absolute value of x
std::ostream & operator<<(std::ostream &os, Box B)
output operator for the Box class
This class is used for the iray class. This class is intended for internal use only....