mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-02 09:47:58 +03:00
Simplify unused spline function
This commit is contained in:
parent
39c2870e68
commit
080bcbde80
1 changed files with 4 additions and 9 deletions
|
@ -305,15 +305,10 @@ namespace TEN::Effects::ElectricArc
|
||||||
// More standard version. Adopt this in place of the above.
|
// More standard version. Adopt this in place of the above.
|
||||||
Vector3 CatmullRomSpline(float alpha, const std::array<Vector3, 4>& knots)
|
Vector3 CatmullRomSpline(float alpha, const std::array<Vector3, 4>& knots)
|
||||||
{
|
{
|
||||||
auto knot0 = knots[0];
|
auto point1 = knots[1] + ((knots[2] - knots[0]) * (1 / 6.0f));
|
||||||
auto knot1 = knots[1];
|
auto point2 = knots[2];
|
||||||
auto knot2 = knots[2];
|
auto point3 = knots[2] + ((knots[3] - knots[1]) * (-1 / 6.0f));
|
||||||
auto knot3 = knots[3];
|
auto point4 = knots[3];
|
||||||
|
|
||||||
auto point1 = knot1 + ((knot2 - knot0) * (1 / 6.0f));
|
|
||||||
auto point2 = knot2;
|
|
||||||
auto point3 = knot2 + ((knot3 - knot1) * (-1 / 6.0f));
|
|
||||||
auto point4 = knot3;
|
|
||||||
|
|
||||||
return (((point2 * 2) + (point3 - point1) * alpha) +
|
return (((point2 * 2) + (point3 - point1) * alpha) +
|
||||||
(((point1 * 2) - (point2 * 5) + (point3 * 4) - point4) * SQUARE(alpha)) +
|
(((point1 * 2) - (point2 * 5) + (point3 * 4) - point4) * SQUARE(alpha)) +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue