20 #ifndef ANTKEEPER_PHYSICS_ORBIT_TRAJECTORY_HPP
21 #define ANTKEEPER_PHYSICS_ORBIT_TRAJECTORY_HPP
66 std::size_t i =
static_cast<std::size_t
>(t / dt);
68 const T* ax = &a[i * n * 3];
72 t = (t / dt - i) * T(2) - T(1);
T evaluate(InputIt first, InputIt last, T x)
Evaluates a Chebyshev polynomial.
Describes the trajectory of an orbit with Chebyshev polynomials.
math::vec3< T > position(T t) const
Calculates the Cartesian position of a trajectory at a given time.
T t0
Start time of the trajectory.
std::vector< T > a
Chebyshev polynomial coefficients.
T t1
End time of the trajectory.
std::size_t n
Chebyshev polynomial degree.