public void Draw(float iTimeStep) { forceDirected.Calculate(iTimeStep); Clear(); forceDirected.EachEdge(delegate(Edge edge, Spring spring) { drawEdge(edge, spring.point1.position, spring.point2.position); }); forceDirected.EachNode(delegate(Node node, Point point) { drawNode(node, point.position); }); }
public void Draw(float iTimeStep) { forceDirected.Calculate(iTimeStep); Clear(); forceDirected.EachEdge(delegate(IEdge edge, Spring spring) { DrawEdge(edge, spring.Point1.Position, spring.Point2.Position); }); forceDirected.EachNode(delegate(INode node, Particle point) { DrawNode(node, point.Position); }); }
public void Draw(float iTimeStep, PaintEventArgs e) { Paper = e.Graphics; forceDirected.Calculate(iTimeStep); Clear(); forceDirected.EachEdge(delegate(Connection edge, Spring spring) { drawEdge(edge, spring.point1.position, spring.point2.position); }); forceDirected.EachNode(delegate(City node, Point point) { drawNode(node, point.position); }); }
public void Draw(float iTimeStep) { forceDirected.Calculate(iTimeStep); //Clear(); forceDirected.EachEdge(delegate(Edge edge, Spring spring) { if (edge.Source.status == nodeStatus.free & edge.Target.status == nodeStatus.free) { drawEdge(edge, spring.point1.position, spring.point2.position); } }); forceDirected.EachNode(delegate(Node node, Point point) { drawNode(node, point.position); }); }