如何从c#中获取窗口形式的顶点位置?

时间:2016-02-25 04:30:01

标签: c# python css user-interface

我已经开始使用无线传感器网络模拟器,我想模拟我自己的拓扑结构,它需要制作连接顶点的环(边界外壳)。 我想要得到窗口形式(图形)上表示的每个顶点的位置,它们是其他顶点的邻居并将它们相互连接,但我想在最近的顶点之间建立连接,(顶点)在彼此之间具有最小半径的情况)wireless sensor network simulator ( node (vertex) deployment)

我的问题是,如何获得每个顶点的位置? 代码4bellow是我尝试计算减少量的方式 int r1 =(int)Math.Sqrt(Math.Pow(firstNode.x - ((WirelessSensor)firstNode.SensorNeighbors [count])。x,2)+ Math.Pow(firstNode.y - ((WirelessSensor)firstNode.SensorNeighbors [count])。y,2)); int r2 =(int)Math.Sqrt(Math.Pow(firstNode.x - ((WirelessSensor)firstNode.SensorNeighbors [count + 1])。x,2)+ Math.Pow(firstNode.y - ((WirelessSensor)firstNode .SensorNeighbors [count + 1])。y,2));

0 个答案:

没有答案