• 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 UnrolledNavMeshGraphPortal

Intermediate struct used by the SSFA algorithm. It keeps track of the original 3D sides of the portals and the 2D projected ones. This information can then be used to reconstruct the intersection points of the straightened path in 3D.

Implements
IUnrolledNavMeshGraphPortal
Namespace: AnyPath.Graphs.NavMesh
Assembly: AnyPath.dll
Syntax
public struct UnrolledNavMeshGraphPortal : IUnrolledNavMeshGraphPortal
Remarks

This method is not confined to word exclusively with the NavMesh. If your segments implement IUnrolledNavMeshGraphPortal you can unroll them into a plane and use it with GetSteerTargetPosition<T>(T, float3, ref int) or AppendCornersUnrolled<T>(NativeSlice<T>, NativeList<CornerAndNormal>, float)

Properties

Left2D

Left side of the portal in the XZ plane

Declaration
public float2 Left2D { get; }
Property Value
Type Description
float2

Left3D

Left side of the portal

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

Normal

Original normal of the triangle

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

Origin2D

Flattened origin of rotation

Declaration
public float2 Origin2D { readonly get; set; }
Property Value
Type Description
float2

Origin3D

Origin of rotation

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

Right2D

Right side of the portal in the XZ plane

Declaration
public float2 Right2D { get; }
Property Value
Type Description
float2

Right3D

Right side of the portal

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

Rotation

The rotation that was used while unrolling this portal

Declaration
public quaternion Rotation { readonly get; set; }
Property Value
Type Description
quaternion

Methods

TransformPoint(float3)

Transforms a point in 3D space to a point in this unrolled segment

Declaration
public float2 TransformPoint(float3 point)
Parameters
Type Name Description
float3 point
Returns
Type Description
float2

Unroll<T>(NativeSlice<T>, NativeSlice<UnrolledNavMeshGraphPortal>)

Unrolls a path of portals into the XZ plane, allowing the SSFA algorithm to work on curved paths.

Declaration
public static void Unroll<T>(NativeSlice<T> path, NativeSlice<UnrolledNavMeshGraphPortal> destSegments) where T : unmanaged, IUnrolledNavMeshGraphPortal
Parameters
Type Name Description
NativeSlice<T> path

The path to process.

NativeSlice<UnrolledNavMeshGraphPortal> destSegments

Output array of the portals. Needs to be of the same length as the path.

Type Parameters
Name Description
T
Remarks

This method is not confined to word exclusively with the NavMesh. If your segments implement IUnrolledNavMeshGraphPortal you can unroll them into a plane and use it with GetSteerTargetPosition<T>(T, float3, ref int) or AppendCornersUnrolled<T>(NativeSlice<T>, NativeList<CornerAndNormal>, float)

Exceptions
Type Condition
ArgumentOutOfRangeException

Implements

IUnrolledNavMeshGraphPortal

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