Home Manual Reference Source Test Repository
public class | source

Line

Line in 2D space

Constructor Summary

Public Constructor
public

constructor(startPoint: *, endPoint: *)

Method Summary

Public Methods
public

getEndPoint(): misc.Point

Get end point

public

getStartPoint(): misc.Point

Get start point

public

Check if it intersect with another line

public

Check if it intersect with polygon

Public Constructors

public constructor(startPoint: *, endPoint: *) 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: *): 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: *): 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