new Bezier(_p0, _c0, _c1, _c1)
Parameters:
Name | Type | Description |
---|---|---|
_p0 |
start position |
|
_c0 |
first control point |
|
_c1 |
last control point |
|
_c1 |
end position |
- Source:
Members
c0
- Source:
c1
- Source:
p0
- Source:
p1
- Source:
Methods
matrixAt(t, m)
Returns the transformation matrix that can be used to align an object to the curve at a given point. Not tested in 2D but shoud work fine.
Parameters:
Name | Type | Description |
---|---|---|
t |
interpolation value [0-1] |
|
m |
SQR.Matrix44 to write the matrix to. If omitted, returns a temporary value, that will be overwritten on next call so do not store this object. |
- Source:
valueAt(t, v)
Returns the position on a curve.
Parameters:
Name | Type | Description |
---|---|---|
t |
interpolation value [0-1] |
|
v |
vector to write the value to. If omitted, returns a temporary value, that will be overwritten on next call so do not store this object. |
- Source:
velocityAt(t, v)
Returns the velocity on a curve.
Parameters:
Name | Type | Description |
---|---|---|
t |
interpolation value [0-1] |
|
v |
vector to write the value to. If omitted, returns a temporary value, that will be overwritten on next call so do not store this object. |
- Source: