创建BVH树对象
三角形数组,BVH树基于此构建
每个树结点包含的最多三角形数量
Returns a list of all the triangles in the BVH which interected a specific node. We use the BVH node structure to first cull out nodes which do not intereset the ray. For rays that did intersect, we test intersection of the ray with each triangle
the origin position of the ray.
the direction vector of the ray.
if 'true', only intersections with front-faces of the mesh will be performed.
[]} IntersectionResult an array of intersection result, one for each triangle which intersected the BVH, each item in the form of: { triangle: Vector3[]; triangleIndex: number; intersectionPoint: Vector3; }
获得与指定射线方向相交的最接近射线起点的相交结果
射线起点
射线方向
可选,是否忽略背面
BVH树