MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ curvature_from_history() [1/2]

float MayaFlux::Kinesis::curvature_from_history ( const Memory::HistoryBuffer< glm::vec2 > &  history,
double  dt,
float  min_speed = 1e-3F 
)
inlinenoexcept

Signed curvature computed directly from a position HistoryBuffer.

Parameters
historyBuffer of positions with capacity >= 3
dtElapsed time between consecutive samples
min_speedForwarded to curvature(); see its doc for why the default is scale-relative rather than machine-epsilon.
Returns
curvature(velocity(history, dt), acceleration(history, dt), min_speed)

Convenience wrapper chaining the two differences a caller would otherwise compute separately before calling curvature() above.

Definition at line 438 of file Differential.hpp.

439{
440 return curvature(velocity(history, dt), acceleration(history, dt), min_speed);
441}
T acceleration(const Memory::HistoryBuffer< T > &history, double dt) noexcept
Second difference: rate of change of velocity.
T velocity(const Memory::HistoryBuffer< T > &history, double dt) noexcept
First difference: rate of change of position.
float curvature(const glm::vec2 &vel, const glm::vec2 &accel, float min_speed=1e-3F) noexcept
Signed curvature from velocity and acceleration.

References acceleration(), curvature(), and velocity().

Referenced by curvature_from_history().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: