void ProcessRightIntersectionEvent(RightIntersectionEvent rightIntersectionEvent) { //restore Z for the time being // Z = PreviousZ; if (rightIntersectionEvent.coneRightSide.Removed == false) { //it can happen that the cone side participating in the intersection is gone; //obstracted by another obstacle or because of a vertex found inside of the cone //PrintOutRightSegTree(); RemoveSegFromRightTree(rightIntersectionEvent.coneRightSide); Z = SweepDirection * rightIntersectionEvent.Site; var rightSide = new BrokenConeSide( rightIntersectionEvent.Site, rightIntersectionEvent.EndVertex, rightIntersectionEvent.coneRightSide); InsertToTree(rightConeSides, rightSide); rightIntersectionEvent.coneRightSide.Cone.RightSide = rightSide; LookForIntersectionOfObstacleSideAndRightConeSide(rightIntersectionEvent.Site, rightIntersectionEvent.EndVertex); TryCreateConeClosureForRightSide(rightSide); } else { Z = SweepDirection * rightIntersectionEvent.Site; } }
void ProcessRightIntersectionEvent(RightIntersectionEvent rightIntersectionEvent) { //restore Z for the time being // Z = PreviousZ; if (rightIntersectionEvent.coneRightSide.Removed == false) { //it can happen that the cone side participating in the intersection is gone; //obstracted by another obstacle or because of a vertex found inside of the cone //PrintOutRightSegTree(); RemoveSegFromRightTree(rightIntersectionEvent.coneRightSide); Z = SweepDirection * rightIntersectionEvent.Site; var rightSide = new BrokenConeSide( rightIntersectionEvent.Site, rightIntersectionEvent.EndVertex, rightIntersectionEvent.coneRightSide); InsertToTree(rightConeSides, rightSide); rightIntersectionEvent.coneRightSide.Cone.RightSide = rightSide; LookForIntersectionOfObstacleSideAndRightConeSide(rightIntersectionEvent.Site, rightIntersectionEvent.EndVertex); TryCreateConeClosureForRightSide(rightSide); } else Z = SweepDirection * rightIntersectionEvent.Site; }