public Polygon Split(VertexInterface b) { VertexInterface bp = this._v.Split(b); Resize(); return(new Polygon(bp)); }
public void Remove() { VertexInterface v = this._v; this._v = (--this._size == 0) ? null : this._v.Ccw(); v.Remove(); }
public VertexInterface Insert(PointInterface p) { if (this._size++ == 0) { this._v = new Vertex(p); } else { this._v = this._v.Insert(new Vertex(p)); } return(this._v); }
protected override void OnDisposing() { if (this._v != null) { VertexInterface w = this._v.Cw(); while (!this._v.Equals(w)) { w.Remove(); w = this._v.Cw(); } this._v = null; } }
private void Resize() { if (this._v == null) { this._size = 0; } else { VertexInterface v = this._v.Cw(); for (this._size = 1; !v.Equals(this._v); this._size++, v = v.Cw()) { ; } } }
public Polygon(Polygon p) { this._size = p._size; if (this._size == 0) { this._v = null; } else { this._v = new Vertex((VertexInterface)p.Point()); for (int i = 1; i < this._size; i++) { p.Advance(Rotation.CLOCKWISE); this._v = this._v.Insert(new Vertex((VertexInterface)p.Point())); } p.Advance(Rotation.CLOCKWISE); this._v = this._v.Cw(); } }
public VertexNode(VertexInterface vertex) { this.Vertex = vertex; }
public VertexInterface SetV(VertexInterface v) { return(this._v = v); }
public VertexInterface Advance(Rotation rotation) { return(this._v = this._v.Neighbor(rotation)); }
public Polygon(VertexInterface v) { this._v = new Vertex(v); Resize(); }
public Polygon() { this._v = null; this._size = 0; }