示例#1
0
 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;
 }
示例#2
0
            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);
                }
            }