Reference Source Test
public class | source

Line

Line in 2D space

Constructor Summary

Public Constructor
public

constructor(startPoint: misc.Point, endPoint: misc.Point)

Method Summary

Public Methods
public

getEndPoint(): misc.Point

Get end point

public

getStartPoint(): misc.Point

Get start point

public

isIntersectWithLine(line: misc.Line): Boolean

Check if it intersect with another line

public

isIntersectWithPolygon(polygon: misc.Polygon): Boolean

Check if it intersect with polygon

Public Constructors

public constructor(startPoint: misc.Point, endPoint: misc.Point) source

Params:

NameTypeAttributeDescription
startPoint misc.Point

Start point of the line

endPoint misc.Point

End point of the line

Public Methods

public getEndPoint(): misc.Point source

Get end point

Return:

misc.Point

public getStartPoint(): misc.Point source

Get start point

Return:

misc.Point

public isIntersectWithLine(line: misc.Line): Boolean source

Check if it intersect with another line

Params:

NameTypeAttributeDescription
line misc.Line

Another line to check intersection with

Return:

Boolean

True if two lines intersect

public isIntersectWithPolygon(polygon: misc.Polygon): Boolean source

Check if it intersect with polygon

Params:

NameTypeAttributeDescription
polygon misc.Polygon

Polygon to check intersection with

Return:

Boolean

True if line intersect polygon