Ejemplo n.º 1
0
 /// <summary>
 ///     Constructs a new trapezoid based on two nodes and two vertical lines.
 /// </summary>
 /// <param name="topNode">The top node.</param>
 /// <param name="bottomNode">The bottom node.</param>
 /// <param name="leftLine">The left line.</param>
 /// <param name="rightLine">The right line.</param>
 internal Trapezoid(Node topNode, Node bottomNode, NodeLine leftLine, NodeLine rightLine)
 {
     TopNode    = topNode;
     BottomNode = bottomNode;
     LeftLine   = leftLine;
     RightLine  = rightLine;
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Checks whether the partial trapezoid contains the two lines.
 /// </summary>
 /// <param name="line1">The line1.</param>
 /// <param name="line2">The line2.</param>
 /// <returns><c>true</c> if [contains] [the specified line1]; otherwise, <c>false</c>.</returns>
 internal bool Contains(NodeLine line1, NodeLine line2)
 {
     if (LeftLine != line1 && LeftLine != line2)
     {
         return(false);
     }
     return(RightLine == line1 || RightLine == line2);
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Constructs a partial trapezoid
 /// </summary>
 /// <param name="topNode">The top node.</param>
 /// <param name="leftLine">The left line.</param>
 /// <param name="rightLine">The right line.</param>
 internal PartialTrapezoid(Node topNode, NodeLine leftLine, NodeLine rightLine)
 {
     TopNode   = topNode;
     LeftLine  = leftLine;
     RightLine = rightLine;
 }