FarseerPhysics.Common.Decomposition.Seidel.YNode.Locate C# (CSharp) Method

Locate() public method

public Locate ( Edge edge ) : Sink
edge Edge
return Sink
        public override Sink Locate(Edge edge)
        {
            if (_edge.IsAbove(edge.P))
                return RightChild.Locate(edge); // Move down the graph

            if (_edge.IsBelow(edge.P))
                return LeftChild.Locate(edge); // Move up the graph

            // s and segment share the same endpoint, p
            if (edge.Slope < _edge.Slope)
                return RightChild.Locate(edge); // Move down the graph

            // Move up the graph
            return LeftChild.Locate(edge);
        }