dhart.raytracer.EmbreeBVH¶
- class dhart.raytracer.EmbreeBVH(geometry: MeshInfo, use_precise: bool = False)¶
An acceelerated datastructure optimized for high performane ray intersections
Note
A BVH is an accelerated data structure that’s used for high performance ray intersections. All functions that ustilize the embree ray tracer require the mesh first to be converted to this format.
- __init__(geometry: MeshInfo, use_precise: bool = False)¶
Create a new BVH from an existing mesh
- Parameters:
geometry – The mesh or meshes to create the BVH from.
use_precise – Use a more precise, but slower ray intersection function
Example
Creating a BVH from a plane object
>>> from dhart.geometry import ConstructPlane >>> from dhart.raytracer import EmbreeBVH
>>> MI = ConstructPlane() >>> BVH = EmbreeBVH(MI)
Methods
AddMesh
(mesh)Add one or more new meshes to the BVH
Attributes
pointer