CG_Labs 2021.2
Loading...
Searching...
No Matches
interpolation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <glm/glm.hpp>
4
5namespace interpolation
6{
18 glm::vec3 evalLERP(glm::vec3 const&p0, glm::vec3 const&p1,
19 float const x);
20
36 glm::vec3 evalCatmullRom(glm::vec3 const&p0, glm::vec3 const&p1,
37 glm::vec3 const&p2, glm::vec3 const&p3,
38 float const t, float const x);
39}
Definition interpolation.hpp:6
glm::vec3 evalCatmullRom(glm::vec3 const &p0, glm::vec3 const &p1, glm::vec3 const &p2, glm::vec3 const &p3, float const t, float const x)
Compute a new position using a Catmull-Rom spline interpolation.
Definition interpolation.cpp:11
glm::vec3 evalLERP(glm::vec3 const &p0, glm::vec3 const &p1, float const x)
Linearly interpolate a position between two points.
Definition interpolation.cpp:4