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

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

            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()
        {
            ConvexHullRing constructor = new ConvexHullRing();

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

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

            //constructor.startFromPointZero();
        }