// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.PolygonClipper {
///
/// Represents a pending intersection between two active edges.
///
///
/// Intersections are sorted and processed from higher scanlines to lower ones so
/// that edge order in the AEL remains consistent as the sweep descends.
///
internal readonly struct IntersectNode
{
#pragma warning disable SA1401 // Hot path intersection sorting benefits from field access.
///
/// Gets the intersection point between and .
///
public readonly Vertex Point;
///
/// Gets the first active edge participating in the intersection.
///
public readonly ActiveEdge Edge1;
///
/// Gets the second active edge participating in the intersection.
///
public readonly ActiveEdge Edge2;
#pragma warning restore SA1401
///
/// Initializes a new instance of the struct.
///
internal IntersectNode(Vertex point, ActiveEdge edge1, ActiveEdge edge2)
{
this.Point = point;
this.Edge1 = edge1;
this.Edge2 = edge2;
}
}
}