Class: Line

me. Line

new Line(x, y, points)

a line segment Object.
Parameters:
Name Type Description
x Number origin point of the Line
y Number origin point of the Line
points Array.<me.Vector2d> array of vectors defining the Line
Source:
line.js, line 18

Extends

Classes

Error

Methods

<static> clone() → {me.Line}

clone this line segment
Source:
line.js, line 85
Returns:
new Line
Type
me.Line

<static> containsPoint(x, y) → {boolean}

check if this line segment contains the specified point
Parameters:
Name Type Description
x Number x coordinate
y Number y coordinate
Source:
line.js, line 33
Returns:
true if contains
Type
boolean

<static> containsPointV(point) → {boolean}

check if this line segment contains the specified point
Parameters:
Name Type Description
point me.Vector2d
Source:
line.js, line 21
Returns:
true if contains
Type
boolean

<static> recalc()

Computes the calculated collision edges and normals. This **must** be called if the `points` array, `angle`, or `offset` is modified manually.
Source:
line.js, line 54
Copyright © 2011 - 2017, Olivier Biot, Jason Oster, Aaron McLeod
Documentation generated by JSDoc 3.4.0 on 2017-02-28T11:37:40+08:00 using the DocStrap template modified by codename-.