Class: DefLine3

algeobra3d~DefLine3(paramsopt)

Definition of a line in 3D

Constructor

new DefLine3(paramsopt)

Default values
Parameters:
Name Type Attributes Description
params Object <optional>
Properties
Name Type Attributes Description
p0 THREE.Vector3 <optional>
The first point on the line
p1 THREE.Vector3 <optional>
The second point on the line
leftOpen Boolean <optional>
Whether the line extends to infinity from the first point
rightOpen Boolean <optional>
Whether the line extends to infinity from the second point
Source:

Methods

compute(info) → {Object}

Computes the line
Parameters:
Name Type Description
info CreateInfo The creation info
Source:
Returns:
An object of type TYPE_LINE3
Type
Object

(static) fromPoints(params) → {CreateInfo}

Computes the line through two points If any value is EMPTY, the default values are used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
p0 Number | Object <optional>
Either the index or value of a TYPE_POINT3. The first point
p1 Number | Object <optional>
Either the index or value of a TYPE_POINT3. The second point
leftOpen Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the line extends to infinity from the first point
rightOpen Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the line extends to infinity from the second point
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromVector(params) → {CreateInfo}

Computes the line defined by a vector. If any value is EMPTY, the default values are used. If no reference is given, the vector's reference point is used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
v Number | Object <optional>
Either the index or value of a TYPE_VECTOR3. The vector
ref Number | Object <optional>
Either the index or value of a TYPE_POINT3. The reference
leftOpen Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the line extends to infinity from the first point
rightOpen Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the line extends to infinity from the second point
Source:
Returns:
The creation info
Type
CreateInfo