GeometriCS/intersections/IntersectionLine2ToLineSegment2.cs
Zdeněk Borovec ad0599f481 Decided on architecture
A sizeable commit, I know, but I wanted to try and write a few aspects before deciding to settle on a system. This one seems to be fine so far. But I would still not rely on it not changing.
2024-04-18 01:29:47 +02:00

61 lines
1.8 KiB
C#

namespace GeometriCS
{
/// <summary>
/// Intersection between a line and a line segment
/// </summary>
public class IntersectionLine2ToLineSegment2d
{
/// <summary>
/// Possible statuses the intersection can be.
/// </summary>
public enum Statuses
{
/// <summary>
/// Intersection is valid.
/// </summary>
SUCCESS,
/// <summary>
/// The two lines are parallel.
/// </summary>
PARALLEL,
/// <summary>
/// The intersection would happen if the intersectors were unbounded, but not inside the bounds.
/// </summary>
OUTOFBOUNDS,
}
/// <summary>
/// The intersecting line.
/// </summary>
public Line2d Line { get; }
/// <summary>
/// The intersecting line segment.
/// </summary>
public LineSegment2d LineSegment { get; }
/// <summary>
/// Status of the intersection.
/// </summary>
public Statuses Status { get; }
/// <summary>
/// The point of the intersection between the line and line segment.
/// </summary>
public Vector2d? Result { get; }
/// <summary>
/// Constructor for Line2d to LinearSegment2d intersection.
/// </summary>
/// <param name="line">The intersecting line.</param>
/// <param name="lineSegment">The intersecting lineSegment.</param>
public IntersectionLine2ToLineSegment2d(Line2d line, LineSegment2d lineSegment)
{
Line = line;
LineSegment = lineSegment;
// Process the intersection
throw new NotImplementedException();
}
}
}