Zdeněk Borovec
ad0599f481
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.
57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
namespace GeometriCS
|
|
{
|
|
/// <summary>
|
|
/// Intersection between two two-dimensional lines.
|
|
/// </summary>
|
|
public class IntersectionLine2ToLine2d
|
|
{
|
|
/// <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>
|
|
/// First of the intersecting lines.
|
|
/// </summary>
|
|
public Line2d Line1 { get; }
|
|
|
|
/// <summary>
|
|
/// The second intersecting line.
|
|
/// </summary>
|
|
public Line2d Line2 { get; }
|
|
|
|
/// <summary>
|
|
/// Status of the intersection.
|
|
/// </summary>
|
|
public Statuses Status { get; }
|
|
|
|
/// <summary>
|
|
/// The point of the intersection between the two lines.
|
|
/// </summary>
|
|
public Vector2d? Result { get; }
|
|
|
|
/// <summary>
|
|
/// Constructor for Line2d to Line2d intersection.
|
|
/// </summary>
|
|
/// <param name="line1">First of the intersecting lines.</param>
|
|
/// <param name="line1">Second of the intersecting lines.</param>
|
|
public IntersectionLine2ToLine2d(Line2d line1, Line2d line2)
|
|
{
|
|
Line1 = line1;
|
|
Line2 = line2;
|
|
|
|
// Process the intersection
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|