GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
triangle_box_intersection.h
Go to the documentation of this file.
1#include "vector.h"
2#include "box.h"
3#include "triangle.h"
4#pragma once
5namespace GOAT
6{
7 namespace raytracing
8 {
9 int triBoxOverlap(const maths::Vector<double> boxcenter, const maths::Vector<double> boxhalfsize, const maths::Vector<double> triverts[3]);
10 int triBoxOverlap(double boxcenter[3], double boxhalfsize[3], double triverts[3][3]);
11 bool triangleAABBIntersection(const Box& B, const triangle& d);
12 inline double min3(double x, double y, double z)
13 {
14 double erg = x;
15 if (erg > y) erg = y;
16 if (erg > z) erg = z;
17 return erg;
18 }
19
20 inline double max3(double x, double y, double z)
21 {
22 double erg = x;
23 if (erg < y) erg = y;
24 if (erg < z) erg = z;
25 return erg;
26 }
27 }
28}
Template class for threedimensional vectors.
Definition vector.h:57
class which represents a box (cuboid). It is derived by class ObjectShape This class is mainly used f...
Definition box.h:18
This class describes a triangle, represented by its corner points. It is intented for internal purpos...
Definition triangle.h:13
Raytracer used for ultrashort pulse calculation with raytracing only.
Definition asphericLens.h:6
double max3(double x, double y, double z)
double min3(double x, double y, double z)
int triBoxOverlap(const maths::Vector< double > boxcenter, const maths::Vector< double > boxhalfsize, const maths::Vector< double > triverts[3])
bool triangleAABBIntersection(const Box &B, const triangle &d)
This class is used for the iray class. This class is intended for internal use only....
Definition fresnel.h:7
This file contains the Vector template class and some useful functions around this class.