Methods
compute(info) → {Array}
Computes the parameter on a curve
Parameters:
Name | Type | Description |
---|---|---|
info |
CreateInfo | The creation info |
- Source:
Returns:
The t values of type TYPE_NUMBER
- Type
- Array
(static) arcParam(arc, p, eps) → {Array.<Number>}
Computes the parameter of a point on an arc.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
arc |
Object | The arc object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) bezierParam(curve, p, eps) → {Array.<Number>}
Computes the parameter of a point on a Bezier curve.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
curve |
Object | The curve object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) bezierSplineParam(spline, p, eps) → {Array.<Number>}
Computes the parameter of a point on a Bezier spline.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
spline |
Object | The Bezier spline object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) curveParam(curve, p, eps) → {Array.<Number>}
Parameters:
Name | Type | Description |
---|---|---|
curve |
Object | The curve object |
p |
Object | The point |
eps |
Number | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) ellipseParam(ellipse, p, eps) → {Array.<Number>}
Computes the parameter of a point on an ellipse.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
ellipse |
Object | The ellipse object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) fromCurve(curve, p, params) → {CreateInfo}
Computes the paramter of a point on a curve
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
curve |
Number | Object | Either the index or value of a curve object. The supported types are specified at the documention of this class | ||||||||||||
p |
Number | Object | Either the index or value of a TYPE_POINT. The point | ||||||||||||
params |
Object |
Properties
|
- Source:
Returns:
The creation info
- Type
- CreateInfo
(static) lineParam(line, p, params) → {Array.<Number>}
Computes the parameter of a point on a line.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line |
Object | The line object | ||||||||||||||||
p |
Object | The point | ||||||||||||||||
params |
Object |
Properties
|
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) lineStripParam(lineStrip, p, eps) → {Array.<Number>}
Computes the parameter of a point on a line strip.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lineStrip |
Object | The line strip object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) polygonParam(poly, p, eps) → {Array.<Number>}
Computes the parameter of a point on a polygon.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
poly |
Object | The polygon object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>
(static) vectorParam(v, p, eps) → {Array.<Number>}
Computes the parameter of a point on a vector.
The vector is treated as a line segment from the reference to the arrow tip
Parameters:
Name | Type | Default | Description |
---|---|---|---|
v |
Object | The vector object | |
p |
Object | The point | |
eps |
Number | 1e-10 | The epsilon value used for comparisons |
- Source:
Returns:
The possible t values
- Type
- Array.<Number>