1 #ifndef GONG_PHYSICS_DERIVATIVE_HPP_
2 #define GONG_PHYSICS_DERIVATIVE_HPP_
4 #include "../graphics/glm.hpp"
6 #include <glm/gtc/quaternion.hpp>
22 Derivative() noexcept;
33 inline Derivative operator +(const Derivative &a, const Derivative &b) noexcept {
34 return Derivative(a.dpos + b.dpos, a.dlin + b.dlin, a.dorient * b.dorient, a.dang + b.dang);
37 inline Derivative operator *(float f, const Derivative &d) noexcept {
38 return Derivative(f * d.dpos, f * d.dlin, f * d.dorient, f * d.dang);
40 inline Derivative operator *(const Derivative &d, float f) noexcept {
44 State &operator +=(State &s, const Derivative &d) noexcept;