Struct NavMeshGraph.Segment
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
Assembly: Assembly-CSharp.dll
Syntax
public struct Segment : ICorridorSegment, ICorridorSegmentProjection, IUnwrappableCorridorSegment
Constructors
|
Improve this Doc
View Source
Segment(Triangle, Int32)
Declaration
public Segment(Triangle triangle, int flags)
Parameters
Type |
Name |
Description |
Triangle |
triangle |
|
System.Int32 |
flags |
|
Properties
|
Improve this Doc
View Source
Flags
Declaration
public int Flags { readonly get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Left
Used by the funnel algorithm, defines the "left" side of the portal.
Declaration
public float3 Left { readonly get; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
Normal
Normal of the segment. This is the normal of the triangle that was used to get the portal sides from.
Declaration
public readonly float3 Normal { get; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
Right
Used by the funnel algorithm, defines the "right" side of the portal.
Declaration
public float3 Right { readonly get; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
TargetPosition
The target position to move towards when traversing the path.
When a funnel algorithm is applied, this property points to the ideal location between the portal's left and right
to make a path as straight as possbile. See CorridorProcessor for more details.
Declaration
public float3 TargetPosition { readonly get; set; }
Property Value
Type |
Description |
Unity.Mathematics.float3 |
|
Methods
|
Improve this Doc
View Source
Narrow(float3)
Used by the CorridorProcessor for the start and goal segments. This returns a copy of this segment, only
with Left and Right set exactly to the target position.
Declaration
public NavMeshGraph.Segment Narrow(float3 targetPosition)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
targetPosition |
The starting or goal position
|
Returns
Type |
Description |
NavMeshGraph.Segment |
A copy of this segment that has both Left and Right set to target Position
|
Explicit Interface Implementations
|
Improve this Doc
View Source
ICorridorSegmentProjection.Left
Declaration
readonly float2 ICorridorSegmentProjection.Left { get; }
Returns
Type |
Description |
Unity.Mathematics.float2 |
|
|
Improve this Doc
View Source
ICorridorSegmentProjection.Right
Declaration
readonly float2 ICorridorSegmentProjection.Right { get; }
Returns
Type |
Description |
Unity.Mathematics.float2 |
|
Implements
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>)