示例#1
0
文件: Route.cs 项目: MinhHuong/WSN-PN
        public PointF GetEndPoint()
        {
            StateItem to = (StateItem)this.to;
            if (this.nails.Count == 0)
            {
                StateItem from = (StateItem)this.from;
                return GraphUltility.FindPointByDistance(to.Center(), from.Center(), StateItem.R + 2);
            }

            return GraphUltility.FindPointByDistance(to.Center(), this.nails[this.nails.Count - 1].Center(), StateItem.R + 2);
        }
示例#2
0
        public PointF GetStartingPoint()
        {
            StateItem from = (StateItem)this.from;

            if (this.nails.Count == 0)
            {
                StateItem to = (StateItem)this.to;
                return(GraphUltility.FindPointByDistance(from.Center(), to.Center(), StateItem.R + 2));
            }

            return(GraphUltility.FindPointByDistance(from.Center(), this.nails[0].Center(), StateItem.R + 2));
        }