• Articles
  • Api Documentation
Show / Hide Table of Contents
  • AnyPath
    • Graphs
      • Extra
        • Line2D
        • Line3D
        • Triangle
      • HexGrid
        • HexGrid
        • HexGrid.Enumerator
        • HexGridCell
        • HexGridHeuristicProvider
        • HexGridType
      • Line
        • ClosestLineLocationPredicate
        • LineGraph
        • LineGraph.Edge
        • LineGraph.Enumerator
        • LineGraphBuilder
        • LineGraphBuilder.ProtoEdge
        • LineGraphDrawer
        • LineGraphHeuristic
        • LineGraphLocation
        • LineGraphPopulator
        • LineGraphProcessor
        • LineGraphWelder
        • SceneGraph
          • LineGraphNode
          • LineSceneGraph
          • LineSceneGraphEdge
          • SceneGraphNodeEditor
      • NavMesh
        • ClosestNavMeshLocationPredicate
        • CornerAndNormal
        • IUnrolledNavMeshGraphPortal
        • NavMeshGraph
        • NavMeshGraph.EnterCostAndFlags
        • NavMeshGraph.Enumerator
        • NavMeshGraphCorners
        • NavMeshGraphCorners3D
        • NavMeshGraphHeuristic
        • NavMeshGraphLocation
        • NavMeshGraphUnroller
        • NavMeshLineBitmaskMod
        • NavMeshLineMod
        • NavMeshPlaneBitmaskMod
        • NavMeshPlaneMod
        • NavMeshPopulator
        • NavMeshWelder
        • SSFA
        • UnrolledNavMeshGraphPortal
      • Node
        • NodeGraph
        • NodeGraphNode
      • PlatformerGraph
        • ClosestPlatformerGraphLocationPredicate
        • PlatformerGraph
        • PlatformerGraph.Enumerator
        • PlatformerGraphBuilder
        • PlatformerGraphBuilder.ProtoEdge
        • PlatformerGraphDrawer
        • PlatformerGraphHeuristic
        • PlatformerGraphLocation
        • PlatformerGraphPopulator
        • PlatformerGraphProcessor
        • PlatformerGraphWelder
        • SceneGraph
          • PlatformerSceneGraph
          • PlatformerSceneGraphEdge
          • PlatformerSceneGraphNode
          • SceneGraphNodeEditor
      • SquareGrid
        • SquareGrid
        • SquareGrid.Enumerator
        • SquareGridCell
        • SquareGridHeuristicProvider
        • SquareGridHeuristicProviderEightDirectional
        • SquareGridHeuristicProviderManhattanDistance
        • SquareGridType
      • VoxelGrid
        • VoxelGrid
        • VoxelGrid.DirCost
        • VoxelGrid.Enumerator
        • VoxelGridCell
        • VoxelGridDirectionFlags
        • VoxelGridDirectionMod
        • VoxelGridHeuristicProvider
        • VoxelGridHeuristicProviderManhattanDistance
    • Managed
      • ClearFinderFlags
      • FinderExtensions
      • IFinder
      • IOptionReserver<TOption>
      • IOptionValidator<TOption>
      • ImmutableFinderException
      • ManagedDisposeExtensions
      • Results
        • DijkstraResult<TNode>
        • Eval
        • Eval<TOption>
        • MultiEvalResult
        • MultiPathResult<TSeg>
        • Path<TSeg>
        • Path<TOption, TSeg>
    • Native
      • AStarCheapestOption
      • AStarEvalOptionResult
      • AStarEvalResult
      • AStarFindOptionResult
      • AStarFindPathResult
      • AStarOption
      • AStarStops
      • AStar<TNode>
      • ComposedGraph<TGraph, TNode>
      • Edge<TNode>
      • FlagBitmask<TNode>
      • IEdgeMod<TNode>
      • IGraph<TNode>
      • IHeuristicProvider<TNode>
      • INodeFlags
      • IPathProcessor<TNode, TSeg>
      • NativeListWrapper<TSeg>
      • NoEdgeMod<TNode>
      • NoProcessing<TNode>
      • OffsetInfo
      • ReversedGraph<TNode>
      • EdgeMods
        • AdditionalAndExcludeEdges<TNode>
        • AdditionalEdges<TNode>
        • ExcludeEdges<TNode>
        • ExcludeLocations<TNode>
      • Heuristics
        • ALTCompute<TGraph, TNode>
        • ALTSerialization
        • ALT<TNode>
        • LandmarkSelection<TGraph, TNode, TEnumerator>
      • Util
        • IRefComparer<T>
        • NativeMinHeap<T, TComp>
        • NativeRefMinHeap<T, TComp>

Struct NavMeshGraphLocation

A location on the NavMeshGraph represents a triangle and a position within that triangle. Furthermore, when part of a path, the Left and Right properties point to the shared edge with the next triangle in the path.

Implements
IEquatable<NavMeshGraphLocation>
IUnrolledNavMeshGraphPortal
INodeFlags
Namespace: AnyPath.Graphs.NavMesh
Assembly: AnyPath.dll
Syntax
public struct NavMeshGraphLocation : IEquatable<NavMeshGraphLocation>, IUnrolledNavMeshGraphPortal, INodeFlags

Properties

ExitPosition

This value is used internally by A* to provide better distance estimates between triangles. This is the closest point on the portal of this triangle inside a path to the previous position. This eliminates the problem where small triangles are adjecent to large ones and a weird detour gets taken in case we'd measure distances from the centers of the triangles. For locations used as start/goal, this position is also equal to Left and Right, but for locations inside a path, it is somewhere in between.

Declaration
public float3 ExitPosition { readonly get; set; }
Property Value
Type Description
float3

Flags

Flags of this segment

Declaration
public readonly int Flags { get; }
Property Value
Type Description
int

Left3D

Points to the left side of the edge connecting this triangle to the next triangle in the path. For start and ending positions, this value is equal to Right3D, to allow for navigating to an exact position within the triangle.

Declaration
public float3 Left3D { readonly get; set; }
Property Value
Type Description
float3

Normal

Normal of the triangle for this location

Declaration
public float3 Normal { readonly get; set; }
Property Value
Type Description
float3

Right3D

Points to the left side of the edge connecting this triangle to the next triangle in the path. For start and ending positions, this value is equal to Left3D, to allow for navigating to an exact position within the triangle.

Declaration
public float3 Right3D { readonly get; set; }
Property Value
Type Description
float3

TriangleIndex

The index of the triangle for this location

Declaration
public int TriangleIndex { readonly get; set; }
Property Value
Type Description
int

Methods

AsStartOrGoal()

Used by the SSFA for the start and goal segments. This returns a copy of this segment, only with the triangle's A (Left) and and B (Right) set exactly to the target position.

Declaration
public NavMeshGraphLocation AsStartOrGoal()
Returns
Type Description
NavMeshGraphLocation

A copy of this segment that has both Left and Right set to target Position. Note that this alters the triangle's A + B causing it to be a degenerate triangle. As such, the normal of the triangle can't be determined

Equals(NavMeshGraphLocation)

Declaration
public bool Equals(NavMeshGraphLocation other)
Parameters
Type Name Description
NavMeshGraphLocation other
Returns
Type Description
bool

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()

Shrink(float)

Shrinks the portal, where zero is no shrink and one is a total shrink towards the center.

Declaration
public NavMeshGraphLocation Shrink(float ratio)
Parameters
Type Name Description
float ratio
Returns
Type Description
NavMeshGraphLocation
Remarks

Does not modify the location in place, returns a shrinked copy

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Implements

IEquatable<T>
IUnrolledNavMeshGraphPortal
INodeFlags

Extension Methods

SSFA.Intersect<T>(T, float2, float2)
FinderExtensions.AddOption<T, TNode, TOption>(T, TOption, TNode, TNode)
FinderExtensions.AddOptions<T, TNode, TOption>(T, IEnumerable<TOption>, TNode, Func<TOption, TNode>)
FinderExtensions.AddRange<T, TNode, TOption>(T, IEnumerable<TOption>, TNode, Func<TOption, TNode>)
FinderExtensions.AddRequest<T, TNode>(T, TNode, TNode)
FinderExtensions.AddRequests<T, TNode>(T, IEnumerable<TNode>)
FinderExtensions.AddStop<T, TNode>(T, TNode)
FinderExtensions.AddStops<T, TNode>(T, IEnumerable<TNode>)
FinderExtensions.SetComparer<T, TOption>(T, IComparer<TOption>)
FinderExtensions.SetEdgeMod<T, TMod>(T, TMod)
FinderExtensions.SetGraph<T, TGraph>(T, TGraph)
FinderExtensions.SetHeuristicProvider<T, TH>(T, TH)
FinderExtensions.SetPathProcessor<T, TProc>(T, TProc)
FinderExtensions.SetReserver<T, TOption>(T, IOptionReserver<TOption>)
FinderExtensions.SetStartAndGoal<T, TNode>(T, TNode, TNode)
FinderExtensions.SetValidator<T, TOption>(T, IOptionValidator<TOption>)
In This Article
Back to top Generated by DocFX