A simple struct representing a segment of a 2D Line. GPU: GGGShapes. More...
Public Member Functions | |
bool | Equals (LineSegment2D other) |
float2 | GetCenter () |
override int | GetHashCode () |
float | Length () |
LineSegment2D (Vector2 a, Vector2 b) | |
override string | ToString () |
Static Public Member Functions | |
static float | Distance (LineSegment2D ls, float2 point) |
static bool | PointIsToTheLeft (LineSegment2D ls, float2 point) |
Returns true, if the given point is to the left of the line given its direction. | |
Public Attributes | |
Vector2 | a |
Vector2 | b |
Static Public Attributes | |
static readonly LineSegment2D | negativeInfinite = new LineSegment2D() { a = Vector2.negativeInfinity, b = Vector2.negativeInfinity } |
static readonly LineSegment2D | positiveInfinite = new LineSegment2D() { a = Vector2.positiveInfinity, b = Vector2.positiveInfinity } |
A simple struct representing a segment of a 2D Line. GPU: GGGShapes.
|
static |
ls | |
point |
|
static |
Returns true, if the given point is to the left of the line given its direction.
line | |
point |