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 readonly 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
Type |
Name |
Description |
NativeArray<Aabb> |
aabbs |
|
Int32 |
nodeStartIndex |
|
Int32 |
nodeEndIndex |
|
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
Type |
Description |
JobHandle |
|
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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.