예제 #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));
        }