Acceleration Structures
This is a Beta Feature and not all things work with this.
Bounding Volume Hierarchy
Bounding Volume Hierarchy (or BVH) acts like a primitive object, just like Triangle
or Sphere
. So we can simply pass a BVH object into raytrace
function.
The backward pass for BVH is currently broken
BoundingVolumeHierarchy
An AccelerationStructure
which constructs bounding boxes around groups of triangles to speed up intersection checking. A detailed description of ths technique is present here.
Fields:
scene_list
- The scene list passed into the BVH constructor but in sorted orderroot_node
- RootBVHNode
Constructors:
BoundingVolumeHierarchy(scene::Vector)
RayTracer.AccelerationStructure
— Type.AccelerationStructure
Base Type for all Acceleration Structures. These can be used to speed up rendering by a significant amount. The main design behind an acceleration structure should be such that it can be used as a simple replacement for a vector of Object
s.
RayTracer.BVHNode
— Type.BVHNode
A node in the graph created from the scene list using BoundingVolumeHierarchy
.
Fields:
x_min
- Minimum x-value for the bounding boxx_max
- Maximum x-value for the bounding boxy_min
- Minimum y-value for the bounding boxy_max
- Maximum y-value for the bounding boxz_min
- Minimum z-value for the bounding boxz_max
- Maximum z-value for the bounding boxindex_start
- Starting triangle in the scene listindex_end
- Last triangle in the scene listleft_child
- Can benothing
or anotherBVHNode
right_child
- Can benothing
or anotherBVHNode