DOTS Geometry
 
Loading...
Searching...
No Matches
NativeGraph Struct Reference

A directional graph represenation using an adjacency list for use with the Unity Job System. Each vertex can store a pointer (int). It is up to the user to connect vertices and data. More...

Public Member Functions

unsafe void AddEdge (int vertexIdx, int connectedVertexIdx)
 Connects the first vertex index with the second vertex index with a directional edge.
 
void AddVertex (int dataPtr)
 Adds a vertex to the graph with a given pointer.
 
void Clear ()
 Clears all adjacency lists and vertices.
 
void Dispose ()
 
 NativeGraph (Allocator allocator)
 

Public Attributes

Allocator allocator
 
NativeList< GraphVertexvertices
 

Detailed Description

A directional graph represenation using an adjacency list for use with the Unity Job System. Each vertex can store a pointer (int). It is up to the user to connect vertices and data.

Member Function Documentation

◆ AddEdge()

unsafe void AddEdge ( int vertexIdx,
int connectedVertexIdx )

Connects the first vertex index with the second vertex index with a directional edge.

Parameters
vertexIdx
connectedVertexIdx

◆ AddVertex()

void AddVertex ( int dataPtr)

Adds a vertex to the graph with a given pointer.

Parameters
dataPtr