21 bool intersect(
const Triangle& triangle,
const Ray& ray,
const float hitmax,
float &t );
22 bool intersect(
const BBox& box,
const Ray& ray,
const float hitmax,
float &tmin,
float& tmax );
27 BVHNode( ) : left(
nullptr), right(
nullptr), triangle(
nullptr), box() {}
41 BVH( ) : triangles(), root(
nullptr), box() {}
43 std::vector<Triangle> triangles;
48 BVH make_bvh(
const std::vector<vec3>& positions );
50 extern unsigned long int box_n;
51 extern unsigned long int tri_n;
53 bool intersect(
const BVH& bvh,
const Ray& ray,
const float tmax,
Hit& hit );
representation d'un triangle.
representation d'un point d'intersection.
representation d'un rayon.
representation d'un noeud du bvh.
representation d'un point 3d.