Show / Hide Table of Contents

Class PathRegionSet

Defines a set of path regions of the same type.

Inheritance
System.Object
PathRegionSet
Namespace: Eco.Simulation.Pathfinding.Internal
Assembly: Eco.Simulation.dll
Syntax
public class PathRegionSet : Object

Constructors

PathRegionSet()

Declaration
public PathRegionSet()

Fields

IdToRegion

Declaration
public Dictionary<int, PathRegion> IdToRegion
Field Value
Type Description
System.Collections.Generic.Dictionary<System.Int32, PathRegion>

PosToRegion

Declaration
public Dictionary<WorldPosition3i, PathRegion> PosToRegion
Field Value
Type Description
System.Collections.Generic.Dictionary<WorldPosition3i, PathRegion>

Regions

Declaration
public ThreadSafeList<PathRegion> Regions
Field Value
Type Description
ThreadSafeList<PathRegion>

Properties

PathRegionType

Declaration
public PathRegionType PathRegionType { get; }
Property Value
Type Description
PathRegionType

Methods

CanTraverse(PackedPathNode.PathBlockType)

Declaration
public bool CanTraverse(PackedPathNode.PathBlockType blockType)
Parameters
Type Name Description
PackedPathNode.PathBlockType blockType
Returns
Type Description
System.Boolean

GetRegionAt(Vector3, Boolean, Boolean)

Get the region at the given position, +/- 1 Y

Declaration
public (PathRegion, WorldPosition3i) GetRegionAt(Vector3 rawpos, bool allowOtherYValues, bool checkNeighbors)
Parameters
Type Name Description
System.Numerics.Vector3 rawpos
System.Boolean allowOtherYValues
System.Boolean checkNeighbors
Returns
Type Description
System.ValueTuple<PathRegion, WorldPosition3i>

Initialize(PathRegionType, IReadOnlyDictionary<WorldPosition3i, PackedPathNode>)

Declaration
public void Initialize(PathRegionType type, IReadOnlyDictionary<WorldPosition3i, PackedPathNode> pathGraph)
Parameters
Type Name Description
PathRegionType type
System.Collections.Generic.IReadOnlyDictionary<WorldPosition3i, PackedPathNode> pathGraph

UpdateDirtyRegions(IReadOnlyDictionary<WorldPosition3i, PackedPathNode>)

Declaration
public void UpdateDirtyRegions(IReadOnlyDictionary<WorldPosition3i, PackedPathNode> graph)
Parameters
Type Name Description
System.Collections.Generic.IReadOnlyDictionary<WorldPosition3i, PackedPathNode> graph

UpdateNodeConnectivity(WorldPosition3i, WorldPosition3i, PackedPathNode)

Dirty all regions that had this position.

Declaration
public void UpdateNodeConnectivity(WorldPosition3i oldPos, WorldPosition3i newPos, PackedPathNode newNode)
Parameters
Type Name Description
WorldPosition3i oldPos
WorldPosition3i newPos
PackedPathNode newNode
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾