Struct BoundingVolumeHierarchy
Syntax
public struct BoundingVolumeHierarchy
Constructors
BoundingVolumeHierarchy(NativeArray<BoundingVolumeHierarchy.Node>)
Declaration
public BoundingVolumeHierarchy(NativeArray<BoundingVolumeHierarchy.Node> nodes)
Parameters
BoundingVolumeHierarchy(NativeArray<BoundingVolumeHierarchy.Node>, NativeArray<CollisionFilter>)
Declaration
public BoundingVolumeHierarchy(NativeArray<BoundingVolumeHierarchy.Node> nodes, NativeArray<CollisionFilter> nodeFilters)
Parameters
BoundingVolumeHierarchy(BoundingVolumeHierarchy.Node*, CollisionFilter*)
Declaration
public BoundingVolumeHierarchy(BoundingVolumeHierarchy.Node*nodes, CollisionFilter*nodeFilters)
Parameters
Properties
Domain
Declaration
public Aabb Domain { get; }
Property Value
Methods
Declaration
public void AabbOverlap<TProcessor, TCollector>(OverlapAabbInput input, ref TProcessor processor, ref TCollector collector, int root = 1)
where TProcessor : struct, BoundingVolumeHierarchy.IAabbOverlapLeafProcessor where TCollector : struct, IOverlapCollector
Parameters
Type Parameters
Name |
Description |
TProcessor |
|
TCollector |
|
Build(NativeArray<BoundingVolumeHierarchy.PointAndIndex>, NativeArray<Aabb>, out Int32, Boolean)
Declaration
public void Build(NativeArray<BoundingVolumeHierarchy.PointAndIndex> points, NativeArray<Aabb> aabbs, out int nodeCount, bool useSah = false)
Parameters
BvhOverlap<T>(ref T, BoundingVolumeHierarchy, Int32, Int32)
Declaration
public void BvhOverlap<T>(ref T pairWriter, BoundingVolumeHierarchy other, int rootA = 1, int rootB = 1)
where T : struct, BoundingVolumeHierarchy.ITreeOverlapCollector
Parameters
Type Parameters
Declaration
public bool ColliderCast<TProcessor, TCollector>(ColliderCastInput input, ref TProcessor leafProcessor, ref TCollector collector)
where TProcessor : struct, BoundingVolumeHierarchy.IColliderCastLeafProcessor where TCollector : struct, ICollector<ColliderCastHit>
Parameters
Type |
Name |
Description |
ColliderCastInput |
input |
|
TProcessor |
leafProcessor |
|
TCollector |
collector |
|
Returns
Type Parameters
Name |
Description |
TProcessor |
|
TCollector |
|
Declaration
public bool Distance<TProcessor, TCollector>(ColliderDistanceInput input, ref TProcessor leafProcessor, ref TCollector collector)
where TProcessor : struct, BoundingVolumeHierarchy.IColliderDistanceLeafProcessor where TCollector : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Name |
Description |
TProcessor |
|
TCollector |
|
Declaration
public bool Distance<TProcessor, TCollector>(PointDistanceInput input, ref TProcessor leafProcessor, ref TCollector collector)
where TProcessor : struct, BoundingVolumeHierarchy.IPointDistanceLeafProcessor where TCollector : struct, ICollector<DistanceHit>
Parameters
Type |
Name |
Description |
PointDistanceInput |
input |
|
TProcessor |
leafProcessor |
|
TCollector |
collector |
|
Returns
Type Parameters
Name |
Description |
TProcessor |
|
TCollector |
|
Declaration
public bool Raycast<TProcessor, TCollector>(RaycastInput input, ref TProcessor leafProcessor, ref TCollector collector)
where TProcessor : struct, BoundingVolumeHierarchy.IRaycastLeafProcessor where TCollector : struct, ICollector<RaycastHit>
Parameters
Type |
Name |
Description |
RaycastInput |
input |
|
TProcessor |
leafProcessor |
|
TCollector |
collector |
|
Returns
Type Parameters
Name |
Description |
TProcessor |
|
TCollector |
|
Refit(NativeArray<Aabb>, Int32, Int32)
Declaration
public void Refit(NativeArray<Aabb> aabbs, int nodeStartIndex, int nodeEndIndex)
Parameters
ScheduleBuildJobs(NativeArray<BoundingVolumeHierarchy.PointAndIndex>, NativeArray<Aabb>, NativeArray<CollisionFilter>, NativeArray<Int32>, Int32, JobHandle, Int32, NativeArray<BoundingVolumeHierarchy.Builder.Range>, NativeArray<Int32>)
Declaration
public JobHandle ScheduleBuildJobs(NativeArray<BoundingVolumeHierarchy.PointAndIndex> points, NativeArray<Aabb> aabbs, NativeArray<CollisionFilter> bodyFilters, NativeArray<int> shouldDoWork, int numThreadsHint, JobHandle inputDeps, int numNodes, NativeArray<BoundingVolumeHierarchy.Builder.Range> ranges, NativeArray<int> numBranches)
Parameters
Returns
SelfBvhOverlap<T>(ref T, Int32, Int32)
Declaration
public void SelfBvhOverlap<T>(ref T pairWriter, int rootA = 1, int rootB = 1)
where T : struct, BoundingVolumeHierarchy.ITreeOverlapCollector
Parameters
Type |
Name |
Description |
T |
pairWriter |
|
Int32 |
rootA |
|
Int32 |
rootB |
|
Type Parameters
TreeOverlap<T>(ref T, BoundingVolumeHierarchy.Node*, BoundingVolumeHierarchy.Node*, CollisionFilter*, CollisionFilter*, Int32, Int32)
Declaration
public static void TreeOverlap<T>(ref T pairWriter, BoundingVolumeHierarchy.Node*treeA, BoundingVolumeHierarchy.Node*treeB, CollisionFilter*collisionFilterA = default(CollisionFilter*), CollisionFilter*collisionFilterB = default(CollisionFilter*), int rootA = 1, int rootB = 1)
where T : struct, BoundingVolumeHierarchy.ITreeOverlapCollector
Parameters
Type Parameters