Class: CubicBezierCurve
Cubic Bezier Curve
Constructors
Methods
Constructors
constructor
• new CubicBezierCurve(cvs): CubicBezierCurve
Parameters
| Name | Type | Description |
|---|---|---|
cvs | Vector3[] | controller points |
Returns
Defined in
src/math/CubicBezierCurve.ts:14
Methods
setControlVertices
▸ setControlVertices(cvs): void
update controller points
Parameters
| Name | Type | Description |
|---|---|---|
cvs | Vector3[] | controller points |
Returns
void
Defined in
src/math/CubicBezierCurve.ts:22
getPoint
▸ getPoint(t): Vector3
get position by calc from curve
Parameters
| Name | Type | Description |
|---|---|---|
t | number | a position in range [0-1] |
Returns
Vector3
Defined in
src/math/CubicBezierCurve.ts:34
getTangent
▸ getTangent(t): Vector3
get tagent by calc from curve
Parameters
| Name | Type | Description |
|---|---|---|
t | number | a position in range [0-1] |
Returns
tagent direction
Defined in
src/math/CubicBezierCurve.ts:56
getClosestParam
▸ getClosestParam(pos, paramThreshold?): number
get adjacent coordinates
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
pos | Vector3 | undefined | position |
paramThreshold | number | 0.000001 | threshold value |
Returns
number
a position in range [0-1]
Defined in
src/math/CubicBezierCurve.ts:77
getClosestParamRec
▸ getClosestParamRec(pos, beginT, endT, thresholdT): number
get adjacent coordinates by given range
Parameters
| Name | Type | Description |
|---|---|---|
pos | Vector3 | position |
beginT | number | range from |
endT | number | range end |
thresholdT | number | threshold value |
Returns
number

