|
static BIHNode[] | Build (ref IBounded[] elements, int maxDepth=10, float maxOverlap=0.7f) |
|
static int | HoarePartition (IBounded[] elements, int start, int end, float pivot, ref BIHNode node, int axis) |
|
static float | DistanceToSurface (Triangle[] triangles, Vector3[] vertices, Vector3[] normals, in BIHNode node, in Vector3 point) |
|
static float | DistanceToSurface (BIHNode[] nodes, Triangle[] triangles, Vector3[] vertices, Vector3[] normals, in Vector3 point) |
|
static float | DistanceToSurface (BIHNode[] nodes, Triangle[] triangles, Vector3[] vertices, Vector3[] normals, in BIHNode node, in Vector3 point) |
|
static float Obi.BIH.DistanceToSurface |
( |
BIHNode[] |
nodes, |
|
|
Triangle[] |
triangles, |
|
|
Vector3[] |
vertices, |
|
|
Vector3[] |
normals, |
|
|
in BIHNode |
node, |
|
|
in Vector3 |
point |
|
) |
| |
|
static |
If the current node is not a leaf, figure out which side of the split plane that contains the query point, and recurse down that side. You will get the index and distance to the closest triangle in that subtree. Then, check if the distance to the nearest triangle is closer to the query point than the distance between the query point and the split plane. If it is closer, there is no need to recurse down the other side of the KD tree and you can just return. Otherwise, you will need to recurse down the other way too, and return whichever result is closer.
The documentation for this class was generated from the following file:
- Assets/Obi/Scripts/Common/DataStructures/BVH/BIH.cs