Struct AABB
Axis Aligned Bounding Box with support for fast ray intersection checking.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
Assembly: Assembly-CSharp.dll
Syntax
Constructors
|
Improve this Doc
View Source
AABB(float3, float3)
Declaration
public AABB(float3 min, float3 max)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
min |
Bottom left
|
Unity.Mathematics.float3 |
max |
Top right
|
Fields
|
Improve this Doc
View Source
max
Declaration
public readonly float3 max
Field Value
Type |
Description |
Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
min
Declaration
public readonly float3 min
Field Value
Type |
Description |
Unity.Mathematics.float3 |
|
Properties
|
Improve this Doc
View Source
Center
Declaration
public readonly float3 Center { get; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
IsValid
Declaration
public readonly bool IsValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Size
Declaration
public readonly float3 Size { get; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
Methods
|
Improve this Doc
View Source
Contains(in AABB)
Returns wether this AABB fully contains another
Declaration
public bool Contains(in AABB other)
Parameters
Type |
Name |
Description |
AABB |
other |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IntersectsRay(in float3, in float3)
Returns if a ray intersects with this bounding box.
Declaration
public bool IntersectsRay(in float3 rayPos, in float3 rayInvDir)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
rayPos |
|
Unity.Mathematics.float3 |
rayInvDir |
|
Returns
Type |
Description |
System.Boolean |
Wether the ray intersects this bounding box
|
|
Improve this Doc
View Source
IntersectsRay(in Ray)
Returns if a ray intersects with this bounding box. If you need the test the same ray
against a lot of AABB's, it's more efficient to precompute the inverse of the ray direction and call the
overload.
Declaration
public bool IntersectsRay(in Ray ray)
Parameters
Type |
Name |
Description |
UnityEngine.Ray |
ray |
|
Returns
Type |
Description |
System.Boolean |
Wether the ray intersects this bounding box
|
|
Improve this Doc
View Source
Overlaps(in AABB)
Returns wether this AABB overlaps with another AABB
Declaration
public bool Overlaps(in AABB other)
Parameters
Type |
Name |
Description |
AABB |
other |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Extension Methods
AStar.FindPath<TGraph, TNode, TSeg, TProc>(ref TGraph, TNode, TNode, AStarSettings, ref Memory<TNode, TSeg>, ref TProc, ref NativeList<TSeg>)
AStarStops.FindPathStops<TGraph, TNode, TSeg, TMod>(ref TGraph, NativeSlice<TNode>, AStarSettings, ref Memory<TNode, TSeg>, ref TMod, ref NativeList<TSeg>, ref NativeList<Int32>)
AStarOption.FindOption<TGraph, TNode, TSeg, TProc>(ref TGraph, NativeSlice<TNode>, NativeSlice<OffsetInfo>, AStarSettings, ref Memory<TNode, TSeg>, ref TProc, ref NativeList<TSeg>)
AStarOption.FindOptionRemap<TGraph, TNode, TSeg, TProc>(ref TGraph, NativeSlice<Int32>, NativeSlice<TNode>, NativeSlice<OffsetInfo>, AStarSettings, ref Memory<TNode, TSeg>, ref TProc, ref NativeList<TSeg>)
AStarOption.EvalOptionRemap<TGraph, TNode, TSeg, TProc>(ref TGraph, NativeSlice<Int32>, NativeSlice<TNode>, NativeSlice<OffsetInfo>, AStarSettings, ref Memory<TNode, TSeg>, ref TProc)
AStarCheapestOption.FindCheapestTarget<TGraph, TNode, TSeg, TProc>(ref TGraph, NativeSlice<TNode>, NativeSlice<OffsetInfo>, AStarSettings, ref Memory<TNode, TSeg>, ref TProc, ref NativeList<TSeg>, ref NativeList<TSeg>, ref NativeList<TSeg>)