Uranium
Application Framework
|
Represents a line segment in 2D. More...
Public Member Functions | |
def | __init__ |
Creates a new line segment with the specified endpoints. More... | |
def | getEnd (self) |
Gets the second endpoint (B) of the line segment. More... | |
def | getStart (self) |
Gets the first endpoint (A) of the line segment. More... | |
def | intersection |
Returns the point of intersection of this line segment with another line segment, if any. More... | |
def | intersectsWithLine |
Returns whether the line segment intersects the specified (infinite) line. More... | |
Represents a line segment in 2D.
The line segment is represented by two endpoints.
def UM.Math.LineSegment.LineSegment.__init__ | ( | self, | |
endpoint_a | |||
) |
Creates a new line segment with the specified endpoints.
endpoint_a | An endpoint of the line segment. |
endpoint_b | An endpoint of the line segment. |
def UM.Math.LineSegment.LineSegment.getEnd | ( | self, | |
Vector2 | |||
) |
Gets the second endpoint (B) of the line segment.
def UM.Math.LineSegment.LineSegment.getStart | ( | self, | |
Vector2 | |||
) |
Gets the first endpoint (A) of the line segment.
def UM.Math.LineSegment.LineSegment.intersection | ( | self, | |
other | |||
) |
Returns the point of intersection of this line segment with another line segment, if any.
other | The line segment to check intersection with. |
def UM.Math.LineSegment.LineSegment.intersectsWithLine | ( | self, | |
a | |||
) |
Returns whether the line segment intersects the specified (infinite) line.
If the line segment touches the line with one or both endpoints, that counts as an intersection too.
a | A point on the line to intersect with. |
b | A different point on the line to intersect with. |