28#ifndef LIBSBX_ANIMATIONS_SPLINE_HPP_
29#define LIBSBX_ANIMATIONS_SPLINE_HPP_
34#include <libsbx/utility/assert.hpp>
36#include <libsbx/math/vector3.hpp>
37#include <libsbx/math/quaternion.hpp>
40#include <libsbx/core/engine.hpp>
42namespace sbx::animations {
64template<
typename Type>
80 auto add(
const std::float_t timestamp,
const Type& value) -> void;
95 auto sample(
const std::float_t time)
const -> Type;
102 auto size()
const noexcept -> std::size_t;
106 std::vector<std::float_t> _timestamps;
107 std::vector<Type> _values;
113#include <libsbx/animations/spline.ipp>
Time-ordered spline for interpolated animation values.
Definition: spline.hpp:65
auto sample(const std::float_t time) const -> Type
Sample the spline at a given time.
Definition: spline.ipp:13
auto size() const noexcept -> std::size_t
Retrieve the number of keyframes stored.
Definition: spline.ipp:37
auto add(const std::float_t timestamp, const Type &value) -> void
Add a keyframe to the spline.
Definition: spline.ipp:7