public Topology(IGeometry geometry) { this.geometry = geometry; // Warning: circular reference will keep geom/topo alive. edgeCache = new Dictionary <long, Edge>(); centroids = new List <Centroid>(); vertexNeighbours = null; }
public void GenerateNeighbours() { vertexNeighbours = new VertexNeighbours(geometry.NumVertices); for (int i = 0; i < geometry.NumIndices; i += 3) { int v0 = (int)geometry.Indices[i]; int v1 = (int)geometry.Indices[i + 1]; int v2 = (int)geometry.Indices[i + 2]; vertexNeighbours.AddTriangle(v0, v1, v2); } }