Class Line2d
Represents a 2-dimensional line.
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Line2d : object
Constructors
| Improve this Doc View SourceLine2d(Point2d, Point2d)
Initializes a new instance of the Line2d class.
Declaration
public Line2d(Point2d startPoint, Point2d endPoint)
Parameters
Type | Name | Description |
---|---|---|
Point2d | startPoint | Start point of the line. |
Point2d | endPoint | End point of the line. |
Line2d(Point2d, Vector2d)
Initializes a new instance of the Line2d class.
Declaration
public Line2d(Point2d startPoint, Vector2d direction)
Parameters
Type | Name | Description |
---|---|---|
Point2d | startPoint | The start point of the line. |
Vector2d | direction | Direction. The length of the vector will determine the end point. |
Line2d(Point2d, Vector2d, Double)
Initializes a new instance of the Line2d class.
Declaration
public Line2d(Point2d startPoint, Vector2d direction, double length)
Parameters
Type | Name | Description |
---|---|---|
Point2d | startPoint | Start point. |
Vector2d | direction | Direction (length of vector will be disregarded). |
System.Double | length | Desired length of the line. |
Properties
| Improve this Doc View SourceDomain
Gets or sets the line's domain.
Declaration
public Interval Domain { get; set; }
Property Value
Type | Description |
---|---|
Interval | Interval. |
EndPoint
Gets or sets the end point of the line.
Declaration
public Point2d EndPoint { get; set; }
Property Value
Type | Description |
---|---|
Point2d | 3D Point. |
Length
Gets the length of the line.
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
System.Double |
StartPoint
Gets or sets the start point of the line.
Declaration
public Point2d StartPoint { get; set; }
Property Value
Type | Description |
---|---|
Point2d | 3D Point. |
Vector
Gets the vector representation of the line.
Declaration
public Vector2d Vector { get; }
Property Value
Type | Description |
---|---|
Vector2d |
Methods
| Improve this Doc View SourceIsLeft(Point2d)
Computes if a given point is at the left, right or on the current line.
Declaration
public double IsLeft(Point2d point)
Parameters
Type | Name | Description |
---|---|---|
Point2d | point | Point to test. |
Returns
Type | Description |
---|---|
System.Double |
|
Operators
| Improve this Doc View SourceImplicit(Line2d to Vector2d)
Implicit conversion from line to vector.
Declaration
public static implicit operator Vector2d(Line2d line)
Parameters
Type | Name | Description |
---|---|---|
Line2d | line | Line to be transformed into vector. |
Returns
Type | Description |
---|---|
Vector2d |