Class: DefLine

algeobra~DefLine(params, p0, p1, leftOpen, rightOpen)

Definition of a line. A line is defined by two points. The line might be extended to infinity for the first, second, neither or both of those two points

Constructor

new DefLine(params, p0, p1, leftOpen, rightOpen)

Default values
Parameters:
Name Type Description
params Object
p0 Object The first point on the line
p1 Object The second point on the line
leftOpen Boolean Whether the line is extended from the first point
rightOpen Boolean Whether the line is extended from the second point
Source:

Methods

compute(createInfo) → {Object}

Compute the line
Parameters:
Name Type Description
createInfo CreateInfo The creation info
Source:
Returns:
An object of type TYPE_LINE
Type
Object

(static) fromPointVector(p, v) → {CreateInfo}

Computes a line from a point in the direction of a vector.
Parameters:
Name Type Description
p Number | Object Either the index or value of a TYPE_POINT. The starting point
v Number | Object Either the index or value of a TYPE_VECTOR. The vector direction
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPoints(p0, p0) → {CreateInfo}

Computes a line through two points
Parameters:
Name Type Description
p0 Number | Object Either the index or value of a TYPE_POINT. The starting point
p0 Number | Object Either the index or value of a TYPE_POINT. The end point
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromVector(v) → {CreateInfo}

Computes a line from a vector. The line is extended through the vector reference point and in its direction
Parameters:
Name Type Description
v Number | Object Either the index or value of a TYPE_VECTOR. The vector
Source:
Returns:
The creation info
Type
CreateInfo