forked from NtsFranz/Spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpline.cs
More file actions
33 lines (28 loc) · 801 Bytes
/
Spline.cs
File metadata and controls
33 lines (28 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Numerics;
namespace Spark
{
public class Spline
{
private CameraTransform[] keyframes;
private Vector3[] velocities;
public Spline(CameraTransform[] keyframes)
{
this.keyframes = keyframes;
velocities = new Vector3[keyframes.Length];
// set the start and end velocities to 0
velocities[0] = Vector3.Zero;
velocities[keyframes.Length] = Vector3.Zero;
if (keyframes.Length > 2)
{
for (int i = 1; i < keyframes.Length-1; i++)
{
// velocities[i] = (keyframes.)
}
}
}
// public Vector3 GetPoint(float t)
// {
//
// }
}
}