Added Lines
This commit is contained in:
parent
d9d00ec3c0
commit
38932e64ac
2 changed files with 58 additions and 0 deletions
29
structs/Line2d.cs
Normal file
29
structs/Line2d.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
namespace GeometriCS.structs
|
||||
{
|
||||
/// <summary>
|
||||
/// A line through a two-dimensional vector space.
|
||||
/// </summary>
|
||||
public class Line2d
|
||||
{
|
||||
/// <summary>
|
||||
/// A point that lies on the line.
|
||||
/// </summary>
|
||||
public Vector2d PointOnLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Direction vector, along which all the points on the line lie.
|
||||
/// </summary>
|
||||
public Vector2d Direction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the line.
|
||||
/// </summary>
|
||||
/// <param name="pointOnLine">Point that lies on the line.</param>
|
||||
/// <param name="direction">Direction vector on the line.</param>
|
||||
public Line2d(Vector2d pointOnLine, Vector2d direction)
|
||||
{
|
||||
PointOnLine = pointOnLine;
|
||||
Direction = direction;
|
||||
}
|
||||
}
|
||||
}
|
29
structs/Line3d.cs
Normal file
29
structs/Line3d.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
namespace GeometriCS.structs
|
||||
{
|
||||
/// <summary>
|
||||
/// A line through the R cubed space with double precision.
|
||||
/// </summary>
|
||||
public class Line3d
|
||||
{
|
||||
/// <summary>
|
||||
/// A point that lies on the line.
|
||||
/// </summary>
|
||||
public Vector3d PointOnLine { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Direction vector, along which all the points on the line lie.
|
||||
/// </summary>
|
||||
public Vector3d Direction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the line.
|
||||
/// </summary>
|
||||
/// <param name="pointOnLine">Point that lies on the line.</param>
|
||||
/// <param name="direction">Direction vector on the line.</param>
|
||||
public Line3d(Vector3d pointOnLine, Vector3d direction)
|
||||
{
|
||||
PointOnLine = pointOnLine;
|
||||
Direction = direction;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue