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);
     });
 }
예제 #2
0
 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);
     });
 }
예제 #3
0
 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);
     });
 }
예제 #4
0
 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);
     });
 }