28 return abs(h1 % h2) / 2.0;
This class represents a threedimensional (numeric) Matrix as a template.
Template class for threedimensional vectors.
This class describes a triangle, represented by its corner points. It is intented for internal purpos...
triangle(maths::Vector< double > P1, maths::Vector< double > P2, maths::Vector< double > P3)
double v
auxiliary variables for internal use
triangle & operator=(const triangle &dr)
Assignment operator.
void binRead(std::ifstream &is)
maths::Vector< double > getnorm(void)
returns the surface normal n
void binWrite(std::ofstream &os)
void setnorm(maths::Vector< double > n)
sets the surface normal n to the given value
maths::Vector< double > & operator[](int i)
maths::Vector< double > n
normal of the triangle
maths::Vector< double > f[3]
vectors which represents the sides of the triangle. For details refer to function calcSideVectors()
double distance(maths::Vector< double > p, maths::Vector< double > k)
const maths::Vector< double > & operator[](int i) const
Operator, gives back the Position of i-th corner.
void setnorm(void)
calculates the surface normal n with help of the corner points
triangle(maths::Vector< double > ip1, maths::Vector< double > ip2, maths::Vector< double > ip3, maths::Vector< double > P)
int calcIntersectionPoint(maths::Vector< double > r, maths::Vector< double > k, double &t, maths::Vector< double > &p, double eps=1E-5)
triangle(const triangle &d)
Copy constructor.
int calcIntersectionPoint(maths::Vector< double > r, maths::Vector< double > k, maths::Vector< double > &p, double eps=1E-5)
Calculates the intersection point between the triangle and a straight line represented by a point r a...
maths::Vector< double > P[3]
corner points of the triangle
This file contains the definition of a template for 3x3 matrices, which can be used together with the...
Raytracer used for ultrashort pulse calculation with raytracing only.
surface operator-(const surface &s, const maths::Vector< double > &v)
subtracts vector v from all corners of the triangle list of the surface object s
triangle operator/(const triangle &dr, double a)
divide the corners of the triangle dr by the scalar a
surface operator+(const surface &s, const maths::Vector< double > &v)
{
std::ostream & operator<<(std::ostream &os, Box B)
output operator for the Box class
surface operator*(const maths::Matrix< double > &M, const surface &s)
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.