Struct NavMeshGraph
Assembly: AnyPath.dll
Syntax
public struct NavMeshGraph : IGraph<NavMeshGraphLocation>, IDisposable
Constructors
NavMeshGraph(List<Vector3>, List<int>, Matrix4x4, Allocator, List<EnterCostAndFlags>, int, int)
Declaration
public NavMeshGraph(List<Vector3> vertices, List<int> triangles, Matrix4x4 localToWorldMatrix, Allocator allocator, List<NavMeshGraph.EnterCostAndFlags> enterCostAndFlags = null, int trianglesPerOctant = 16, int maxOctreeDepth = 5)
Parameters
NavMeshGraph(Allocator, int, int, int, int)
Declaration
public NavMeshGraph(Allocator allocator, int trianglesPerOctant = 16, int maxOctreeDepth = 5, int initialVertexCapacity = 0, int initialIndicesCapacity = 0)
Parameters
Type |
Name |
Description |
Allocator |
allocator |
|
int |
trianglesPerOctant |
|
int |
maxOctreeDepth |
|
int |
initialVertexCapacity |
|
int |
initialIndicesCapacity |
|
NavMeshGraph(NativeArray<Vector3>, NativeArray<int>, NativeArray<EnterCostAndFlags>, Matrix4x4, Allocator, int, int)
Declaration
public NavMeshGraph(NativeArray<Vector3> vertices, NativeArray<int> triangles, NativeArray<NavMeshGraph.EnterCostAndFlags> enterCostAndFlags, Matrix4x4 localToWorldMatrix, Allocator allocator, int trianglesPerOctant = 16, int maxOctreeDepth = 5)
Parameters
Type |
Name |
Description |
NativeArray<Vector3> |
vertices |
|
NativeArray<int> |
triangles |
|
NativeArray<NavMeshGraph.EnterCostAndFlags> |
enterCostAndFlags |
|
Matrix4x4 |
localToWorldMatrix |
|
Allocator |
allocator |
|
int |
trianglesPerOctant |
|
int |
maxOctreeDepth |
|
NavMeshGraph(Vector3[], int[], Matrix4x4, Allocator, EnterCostAndFlags[], int, int)
Declaration
public NavMeshGraph(Vector3[] vertices, int[] triangles, Matrix4x4 localToWorldMatrix, Allocator allocator, NavMeshGraph.EnterCostAndFlags[] enterCostAndFlags = null, int trianglesPerOctant = 16, int maxOctreeDepth = 5)
Parameters
Type |
Name |
Description |
Vector3[] |
vertices |
|
int[] |
triangles |
|
Matrix4x4 |
localToWorldMatrix |
|
Allocator |
allocator |
|
EnterCostAndFlags[] |
enterCostAndFlags |
|
int |
trianglesPerOctant |
|
int |
maxOctreeDepth |
|
Properties
CostAndFlags
Declaration
public NativeArray<NavMeshGraph.EnterCostAndFlags>.ReadOnly CostAndFlags { get; }
Property Value
Octree
Declaration
public NativeOctree<int> Octree { get; }
Property Value
TriangleCount
Declaration
public int TriangleCount { get; }
Property Value
Triangles
Declaration
public NativeArray<int>.ReadOnly Triangles { get; }
Property Value
Vertices
Declaration
public NativeArray<Vector3>.ReadOnly Vertices { get; }
Property Value
Type |
Description |
NativeArray<Vector3>.ReadOnly |
|
Methods
ClosestLocation(NearestNeighbourCache, float3, float, ClosestNavMeshLocationPredicate, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, ClosestNavMeshLocationPredicate predicate, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, int, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, int flagBitMask, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(NearestNeighbourCache, float3, float, FunctionPointer<ClosestNavMeshLocationPredicate>, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(NativeOctree<int>.NearestNeighbourCache cache, float3 position, float maxDistance, FunctionPointer<ClosestNavMeshLocationPredicate> predicate, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, ClosestNavMeshLocationPredicate, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, ClosestNavMeshLocationPredicate predicate, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, int, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, int flagBitMask, out NavMeshGraphLocation location)
Parameters
Returns
ClosestLocation(float3, float, FunctionPointer<ClosestNavMeshLocationPredicate>, out NavMeshGraphLocation)
Declaration
public bool ClosestLocation(float3 position, float maxDistance, FunctionPointer<ClosestNavMeshLocationPredicate> predicate, out NavMeshGraphLocation location)
Parameters
Returns
Collect(NavMeshGraphLocation, ref NativeList<Edge<NavMeshGraphLocation>>)
Declaration
public void Collect(NavMeshGraphLocation location, ref NativeList<Edge<NavMeshGraphLocation>> edgeBuffer)
Parameters
Dispose()
Declaration
Dispose(JobHandle)
Declaration
public JobHandle Dispose(JobHandle inputDeps)
Parameters
Type |
Name |
Description |
JobHandle |
inputDeps |
|
Returns
Type |
Description |
JobHandle |
|
DrawOctreeGizmo()
Declaration
public void DrawOctreeGizmo()
DrawTrianglesGizmo()
Declaration
public void DrawTrianglesGizmo()
GetAdjecency(int, out int, out int, out int)
Declaration
public void GetAdjecency(int triangleIndex, out int triangleIndex1, out int triangleIndex2, out int triangleIndex3)
Parameters
Type |
Name |
Description |
int |
triangleIndex |
|
int |
triangleIndex1 |
|
int |
triangleIndex2 |
|
int |
triangleIndex3 |
|
GetEnumerator()
Declaration
public NavMeshGraph.Enumerator GetEnumerator()
Returns
GetOverlappingTriangles(AABB, NativeHashSet<int>)
Declaration
public void GetOverlappingTriangles(AABB aabb, NativeHashSet<int> triangleIndices)
Parameters
Type |
Name |
Description |
AABB |
aabb |
|
NativeHashSet<int> |
triangleIndices |
|
GetOverlappingTriangles(AABB, NativeList<int>)
Declaration
public void GetOverlappingTriangles(AABB aabb, NativeList<int> triangleIndices)
Parameters
Type |
Name |
Description |
AABB |
aabb |
|
NativeList<int> |
triangleIndices |
|
GetTriangle(int)
Declaration
public Triangle GetTriangle(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
LocationFromTriangleIndex(int)
Declaration
public NavMeshGraphLocation LocationFromTriangleIndex(int triangleIndex)
Parameters
Type |
Name |
Description |
int |
triangleIndex |
|
Returns
Populate(NavMeshGraph)
Declaration
public void Populate(NavMeshGraph source)
Parameters
Populate(NativeArray<Vector3>, NativeArray<int>)
Declaration
public void Populate(NativeArray<Vector3> vertices, NativeArray<int> triangles)
Parameters
Type |
Name |
Description |
NativeArray<Vector3> |
vertices |
|
NativeArray<int> |
triangles |
|
Populate(NativeArray<Vector3>, NativeArray<int>, NativeArray<EnterCostAndFlags>)
Declaration
public void Populate(NativeArray<Vector3> vertices, NativeArray<int> triangles, NativeArray<NavMeshGraph.EnterCostAndFlags> enterCostAndFlags)
Parameters
Populate(NativeArray<Vector3>, NativeArray<int>, NativeArray<EnterCostAndFlags>, Matrix4x4)
Declaration
public void Populate(NativeArray<Vector3> vertices, NativeArray<int> triangles, NativeArray<NavMeshGraph.EnterCostAndFlags> enterCostAndFlags, Matrix4x4 localToWorldMatrix)
Parameters
Type |
Name |
Description |
NativeArray<Vector3> |
vertices |
|
NativeArray<int> |
triangles |
|
NativeArray<NavMeshGraph.EnterCostAndFlags> |
enterCostAndFlags |
|
Matrix4x4 |
localToWorldMatrix |
|
Populate(Vector3[], int[])
Declaration
public void Populate(Vector3[] vertices, int[] triangles)
Parameters
Type |
Name |
Description |
Vector3[] |
vertices |
|
int[] |
triangles |
|
Raycast(Ray, out NavMeshGraphLocation)
Declaration
public bool Raycast(Ray ray, out NavMeshGraphLocation location)
Parameters
Returns
Declaration
public bool RaycastTriangle(Ray ray, out Triangle triangle, out float3 hitPoint)
Parameters
Type |
Name |
Description |
Ray |
ray |
|
Triangle |
triangle |
|
float3 |
hitPoint |
|
Returns
SetEnterCostAndFlags(int, EnterCostAndFlags)
Declaration
public void SetEnterCostAndFlags(int triangleIndex, NavMeshGraph.EnterCostAndFlags costAndFlags)
Parameters
SetUnwalkable(int)
Declaration
public void SetUnwalkable(int triangleIndex)
Parameters
Type |
Name |
Description |
int |
triangleIndex |
|
Implements
Extension Methods