예제 #1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="network"></param>
            /// <returns>true if the skeleton output is the peak of the 'roof'</returns>
            public override bool CreateArcs(AngularBisectorNetwork network)
            {
                Vertex vA = nodeA.Value;
                Vertex vB = nodeB.Value;

                //  c. if the predecessor of Va is equal to Vb (peak of the roof), then output three
                //     straight skeleton arcs VaI, VbI and VcI where Vc is the predecessor of Va and
                //     the successor of Vb in the LAV simultaneously, and continue on the step 2
                //     NOTE: Cannot occur without circular LAV (i.e. polygon)
                if (nodeA.Previous == nodeB)
                {
                    Vertex vC = nodeA.Previous.Value;
                    network.AddArc(vA, this);
                    network.AddArc(vB, this);
                    network.AddArc(vC, this);
                    return(true);
                }

                //  Convex: d. Output two skeleton arcs of the straight skeleton VaI and VbI
                network.AddArc(vA, this);
                network.AddArc(vB, this);
                return(false);
            }
예제 #2
0
            public override bool CreateArcs(AngularBisectorNetwork network)
            {
                // 2c. do the same as in the convex case, only the meaning is a bit different, because
                //     more local peaks of the roof exist.
                //  c. if the predecessor of Va is equal to Vb (peak of the roof), then output three
                //     straight skeleton arcs VaI, VbI and VcI where Vc is the predecessor of Va and
                //     the successor of Vb in the LAV simultaneously, and continue on the step 2
                //     NOTE: Cannot occur without circular LAV (i.e. polygon)
                //if (nodeA.Previous == nodeB)
                //{
                //Vertex vC = nodeV.Next.Value;
                //network.AddArc(vC, this);
                //network.AddArc(vB, this);
                //network.AddArc(vC, this);
                //return true;
                //}

                // 2d. Output one arc VI of the straight skeleton, where vertex/node V is the one pointed
                //     to by the intersection point I. Intersections of the split event type point to one
                //     vertex in LAV/SLAV.
                network.AddArc(V, this);
                return(false);
            }