Otter
0.9.8.91
2d Game Development Framework based on SFML.Net
|
Class for a simple line with two points. More...
Public Member Functions | |
Line2 (float x1, float y1, float x2, float y2) | |
Create a new Line2. More... | |
Line2 (Vector2 xy1, Vector2 xy2) | |
Create a new Line2. More... | |
bool | Intersects (Line2 other) |
Intersection test on another line. (http://ideone.com/PnPJgb) More... | |
override string | ToString () |
bool | IntersectsRect (float x, float y, float width, float height) |
Check intersection against a rectangle. More... | |
bool | IntersectCircle (Vector2 circle, float radius) |
Check the intersection against a circle. More... | |
Public Attributes | |
float | X1 |
The X position for the first point. More... | |
float | Y1 |
The Y position for the first point. More... | |
float | X2 |
The X position for the second point. More... | |
float | Y2 |
The Y position for the second point. More... | |
Properties | |
Vector2 | PointA [get, set] |
The first point of the line as a vector2. More... | |
Vector2 | PointB [get, set] |
The second point of a line as a vector2. More... | |
float | A [get] |
A in the line equation Ax + By = C. More... | |
float | B [get] |
B in the line equation Ax + By = C. More... | |
float | C [get] |
C in the line equation Ax + By = C. More... | |
Class for a simple line with two points.
Otter.Line2.Line2 | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2 | ||
) |
Create a new Line2.
x1 | X of the first point |
y1 | Y of the first point |
x2 | X of the second point |
y2 | Y of the second point |
Create a new Line2.
xy1 | X,Y of the first point |
xy2 | X,Y of the second point |
bool Otter.Line2.IntersectCircle | ( | Vector2 | circle, |
float | radius | ||
) |
Check the intersection against a circle.
circle | |
radius |
bool Otter.Line2.Intersects | ( | Line2 | other | ) |
Intersection test on another line. (http://ideone.com/PnPJgb)
other | The line to test against |
bool Otter.Line2.IntersectsRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
Check intersection against a rectangle.
x | X Position of the rectangle. |
y | Y Position of the rectangle. |
width | Width of the rectangle. |
height | Height of the rectangle. |
float Otter.Line2.X1 |
The X position for the first point.
float Otter.Line2.X2 |
The X position for the second point.
float Otter.Line2.Y1 |
The Y position for the first point.
float Otter.Line2.Y2 |
The Y position for the second point.
|
get |
A in the line equation Ax + By = C.
|
get |
B in the line equation Ax + By = C.
|
get |
C in the line equation Ax + By = C.
|
getset |
The first point of the line as a vector2.
|
getset |
The second point of a line as a vector2.