示例#1
0
 protected PlacementNode(PlacementNode left, PlacementNode right, Trapezoid trapezoid = null)
 {
     Left      = left;
     Right     = right;
     Trapezoid = trapezoid;
     Parents   = new List <PlacementNode>();
 }
示例#2
0
        internal YNode(Vector leftEnd, Vector rightEnd, PlacementNode left, PlacementNode right) : base(left, right)
        {
            _leftEnd  = leftEnd;
            _rightEnd = rightEnd;

            // PlacementTree.AddEdge() ensures that we use the half edge which goes from left to right
            // so we don't have to check that here.
            _slope = Slope(leftEnd.X, leftEnd.Y, rightEnd.X, rightEnd.Y);
            left.Parents.Add(this);
            right.Parents.Add(this);
        }
示例#3
0
 internal void ReplaceSon(PlacementNode oldSon, PlacementNode newSon)
 {
     if (Left == oldSon)
     {
         Left = newSon;
     }
     else
     {
         Right = newSon;
     }
 }
示例#4
0
 public XNode(PlacementNode left, PlacementNode right, Vertex vtx) : base(left, right)
 {
     _point = vtx.Position;
     left.Parents.Add(this);
     right.Parents.Add(this);
 }
示例#5
0
 internal YNode(PlacementNode left, PlacementNode right, Trapezoid trapezoid = null) : base(left, right, trapezoid)
 {
     left.Parents.Add(this);
     right.Parents.Add(this);
 }