Struct LineGraph
Assembly: AnyPath.dll
Syntax
public struct LineGraph : IGraph<LineGraphLocation>, IDisposable
Constructors
LineGraph(IReadOnlyList<float3>, IReadOnlyList<Edge>, IReadOnlyList<Edge>, Allocator, bool, int, int)
Declaration
public LineGraph(IReadOnlyList<float3> vertices, IReadOnlyList<LineGraph.Edge> undirectedEdges, IReadOnlyList<LineGraph.Edge> directedEdges, Allocator allocator, bool directedEdgesRaycastable = false, int edgesPerOctant = 16, int maxOctreeDepth = 5)
Parameters
LineGraph(Allocator, bool, int, int, int, int)
Declaration
public LineGraph(Allocator allocator, bool directedEdgesQueryable = false, int edgesPerOctant = 16, int maxOctreeDepth = 5, int initialVertexCapacity = 0, int intialEdgeCapacity = 0)
Parameters
Type |
Name |
Description |
Allocator |
allocator |
|
bool |
directedEdgesQueryable |
|
int |
edgesPerOctant |
|
int |
maxOctreeDepth |
|
int |
initialVertexCapacity |
|
int |
intialEdgeCapacity |
|
Properties
DirectedEdgesQueryable
Declaration
public bool DirectedEdgesQueryable { get; }
Property Value
EdgeCount
Declaration
public int EdgeCount { get; }
Property Value
Edges
Declaration
public NativeArray<LineGraph.Edge>.ReadOnly Edges { get; }
Property Value
Octree
Declaration
public NativeOctree<int> Octree { get; }
Property Value
UndirectedEdgeCount
Declaration
public int UndirectedEdgeCount { get; }
Property Value
Vertices
Declaration
public NativeArray<float3>.ReadOnly Vertices { get; }
Property Value
Type |
Description |
NativeArray<float3>.ReadOnly |
|
Methods
ClosestLocation(NearestNeighbourCache, float3, float, ClosestLineLocationPredicate, out LineGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, ClosestLineLocationPredicate predicate, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, out LineGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, int, out LineGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, int flagBitMask, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, FunctionPointer<ClosestLineLocationPredicate>, out LineGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, FunctionPointer<ClosestLineLocationPredicate> predicate, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, ClosestLineLocationPredicate, out LineGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, ClosestLineLocationPredicate predicate, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, out LineGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, int, out LineGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, int flagBitMask, out LineGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, FunctionPointer<ClosestLineLocationPredicate>, out LineGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, FunctionPointer<ClosestLineLocationPredicate> predicate, out LineGraphLocation location)
Parameters
Returns
Collect(LineGraphLocation, ref NativeList<Edge<LineGraphLocation>>)
Declaration
public void Collect(LineGraphLocation location, ref NativeList<Edge<LineGraphLocation>> edgeBuffer)
Parameters
ContainsEdgeId(int)
Declaration
public bool ContainsEdgeId(int edgeId)
Parameters
Type |
Name |
Description |
int |
edgeId |
|
Returns
GetEdgeIndex(int)
Declaration
public int GetEdgeIndex(int edgeId)
Parameters
Type |
Name |
Description |
int |
edgeId |
|
Returns
GetEnumerator()
Declaration
public LineGraph.Enumerator GetEnumerator()
Returns
GetLocationFromEdgeId(int)
Declaration
public LineGraphLocation GetLocationFromEdgeId(int edgeId)
Parameters
Type |
Name |
Description |
int |
edgeId |
|
Returns
GetLocationFromEdgeIndex(int)
Declaration
public LineGraphLocation GetLocationFromEdgeIndex(int edgeIndex)
Parameters
Type |
Name |
Description |
int |
edgeIndex |
|
Returns
GetOverlappingEdgeIndices(AABB, NativeHashSet<int>)
Declaration
public void GetOverlappingEdgeIndices(AABB aabb, NativeHashSet<int> indices)
Parameters
Type |
Name |
Description |
AABB |
aabb |
|
NativeHashSet<int> |
indices |
|
Populate(LineGraph)
Declaration
public void Populate(LineGraph source)
Parameters
Populate(IReadOnlyList<float3>, IReadOnlyList<Edge>, IReadOnlyList<Edge>)
Declaration
public void Populate(IReadOnlyList<float3> vertices, IReadOnlyList<LineGraph.Edge> undirectedEdges, IReadOnlyList<LineGraph.Edge> directedEdges = null)
Parameters
Populate(NativeArray<float3>, NativeArray<Edge>, NativeArray<Edge>)
Declaration
public void Populate(NativeArray<float3> vertices, NativeArray<LineGraph.Edge> undirectedEdges, NativeArray<LineGraph.Edge> directedEdges = default)
Parameters
Type |
Name |
Description |
NativeArray<float3> |
vertices |
|
NativeArray<LineGraph.Edge> |
undirectedEdges |
|
NativeArray<LineGraph.Edge> |
directedEdges |
|
SetEnterCostAndFlags(int, float, int)
Declaration
public void SetEnterCostAndFlags(int edgeIndex, float enterCost, int flags)
Parameters
Type |
Name |
Description |
int |
edgeIndex |
|
float |
enterCost |
|
int |
flags |
|
SetUnwalkable(int)
Declaration
public void SetUnwalkable(int edgeIndex)
Parameters
Type |
Name |
Description |
int |
edgeIndex |
|
TryGetEdgeIndex(int, out int)
Declaration
public bool TryGetEdgeIndex(int edgeId, out int edgeIndex)
Parameters
Type |
Name |
Description |
int |
edgeId |
|
int |
edgeIndex |
|
Returns
Implements
Extension Methods