GeometriCS/intersections/IntersectionLine2ToLineSegment2.cs

62 lines
1.8 KiB
C#
Raw Normal View History

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();
}
}
}