void ProcessLeftIntersectionEvent(LeftIntersectionEvent leftIntersectionEvent) { if (leftIntersectionEvent.coneLeftSide.Removed == false) { if (Math.Abs((leftIntersectionEvent.EndVertex.Point - leftIntersectionEvent.Site) * SweepDirection) < ApproximateComparer.DistanceEpsilon) { //the cone is totally covered by a horizontal segment RemoveCone(leftIntersectionEvent.coneLeftSide.Cone); } else { RemoveSegFromLeftTree(leftIntersectionEvent.coneLeftSide); Z = SweepDirection * leftIntersectionEvent.Site; //it is safe now to restore the order var leftSide = new BrokenConeSide( leftIntersectionEvent.Site, leftIntersectionEvent.EndVertex, leftIntersectionEvent.coneLeftSide); InsertToTree(leftConeSides, leftSide); leftIntersectionEvent.coneLeftSide.Cone.LeftSide = leftSide; LookForIntersectionOfObstacleSideAndLeftConeSide(leftIntersectionEvent.Site, leftIntersectionEvent.EndVertex); TryCreateConeClosureForLeftSide(leftSide); } } else { Z = SweepDirection * leftIntersectionEvent.Site; } }
void ProcessLeftIntersectionEvent(LeftIntersectionEvent leftIntersectionEvent) { if (leftIntersectionEvent.coneLeftSide.Removed == false) { if (Math.Abs((leftIntersectionEvent.EndVertex.Point - leftIntersectionEvent.Site) * SweepDirection) < ApproximateComparer.DistanceEpsilon) { //the cone is totally covered by a horizontal segment RemoveCone(leftIntersectionEvent.coneLeftSide.Cone); } else { RemoveSegFromLeftTree(leftIntersectionEvent.coneLeftSide); Z = SweepDirection * leftIntersectionEvent.Site; //it is safe now to restore the order var leftSide = new BrokenConeSide( leftIntersectionEvent.Site, leftIntersectionEvent.EndVertex, leftIntersectionEvent.coneLeftSide); InsertToTree(leftConeSides, leftSide); leftIntersectionEvent.coneLeftSide.Cone.LeftSide = leftSide; LookForIntersectionOfObstacleSideAndLeftConeSide(leftIntersectionEvent.Site, leftIntersectionEvent.EndVertex); TryCreateConeClosureForLeftSide(leftSide); } } else Z = SweepDirection * leftIntersectionEvent.Site; }