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
BoundingVolumeHierarchyAn 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 order
- root_node- Root- BVHNode
Constructors:
- BoundingVolumeHierarchy(scene::Vector)
RayTracer.AccelerationStructure — Type.AccelerationStructureBase 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 Objects.
RayTracer.BVHNode — Type.BVHNodeA node in the graph created from the scene list using BoundingVolumeHierarchy.
Fields:
- x_min- Minimum x-value for the bounding box
- x_max- Maximum x-value for the bounding box
- y_min- Minimum y-value for the bounding box
- y_max- Maximum y-value for the bounding box
- z_min- Minimum z-value for the bounding box
- z_max- Maximum z-value for the bounding box
- index_start- Starting triangle in the scene list
- index_end- Last triangle in the scene list
- left_child- Can be- nothingor another- BVHNode
- right_child- Can be- nothingor another- BVHNode