Пример #1
0
        private static void showVirtualRadius()
        {
            BorderHullRing ring = new BorderHullRing();

            ring.ell_ring.Height = InitialRadius * 2;
            ring.ell_ring.Width  = InitialRadius * 2;
            BorderHullRing thresh = new BorderHullRing();

            thresh.ell_ring.Height = ThreshHold + InitialRadius * 2;
            thresh.ell_ring.Width  = ThreshHold + InitialRadius * 2;
            //Margin ne?
            Point networkCenter = PublicParameters.networkCenter;

            ring.Margin   = new Thickness(networkCenter.X - ring.ell_ring.Height / 2, networkCenter.Y - ring.ell_ring.Height / 2, 0, 0);
            thresh.Margin = new Thickness(networkCenter.X - thresh.ell_ring.Height / 2, networkCenter.Y - thresh.ell_ring.Height / 2, 0, 0);
            SensingField.Children.Add(ring);
            SensingField.Children.Add(thresh);
        }
Пример #2
0
        private static void ConvexHullBuildMethod()
        {
            BorderHullRing constructor = new BorderHullRing();

            // showVirtualRadius();
            constructor.findTheSetofNodes();
            constructor.findPointZero();
            constructor.getPolarAngleToPointsFromAnchor(PointZero);
            BorderHullNodes AnchorPoint = new BorderHullNodes(PointZero, 0);

            AnchorPoint.PotentialNextHop = ConvexHullSet;
            PointZeroConvex = AnchorPoint;
            constructor.sortConvexHullSet(PointZero);
            SubsetOfHull.Push(AnchorPoint);
            constructor.startBuilding();

            //constructor.startFromPointZero();
        }