#include <CL_Spring.h>
|
template<class F > |
static void | solve (const fpreal *data, fpreal *result, int size, fpreal spring_constant, fpreal mass, fpreal damping_constant, fpreal inc, Method method, const F &interrupt) |
|
static void | solve (const fpreal *data, fpreal *result, int size, fpreal spring_constant, fpreal mass, fpreal damping_constant, fpreal inc, Method method) |
|
template<class F > |
static void | solve (const fpreal *data, fpreal *result, int size, fpreal spring_constant, fpreal mass, fpreal damping_constant, fpreal inc, fpreal initial_displacement, fpreal initial_velocity, Method method, const F &interrupt) |
|
static void | solve (const fpreal *data, fpreal *result, int size, fpreal spring_constant, fpreal mass, fpreal damping_constant, fpreal inc, fpreal initial_displacement, fpreal initial_velocity, Method method) |
|
template<class F > |
static bool | solveRealtime (const F &get_data, fpreal *result, int size, fpreal spring_constant, fpreal mass, fpreal damping_constant, fpreal inc, fpreal &d1, fpreal &d2, Method method) |
|
Definition at line 24 of file CL_Spring.h.
Method used to compute the spring filter. Either position or force.
Definition at line 29 of file CL_Spring.h.
Solve for a spring filter given input data data and result must both be of length size computes initial displacement and initial velocity automatically based on the input data
Definition at line 144 of file CL_Spring.h.
Solve for a spring filter given input data data and result must both be of length size computes initial displacement and initial velocity automatically based on the input data Note: This method is an overload for the above, allowing the user to avoid passing in a lambda for the interrupt method. With c++17 support, this could be more gracefully handled using inline variables:
static inline auto defaultInterruptor = []() { return false; }; template <typename f="decltype(defaultInterruptor)"> static void foo(const F &interrupt = defaultInterruptor) {}
Definition at line 59 of file CL_Spring.h.
template<class F >
void CL_Spring::solve |
( |
const fpreal * |
data, |
|
|
fpreal * |
result, |
|
|
int |
size, |
|
|
fpreal |
spring_constant, |
|
|
fpreal |
mass, |
|
|
fpreal |
damping_constant, |
|
|
fpreal |
inc, |
|
|
fpreal |
initial_displacement, |
|
|
fpreal |
initial_velocity, |
|
|
Method |
method, |
|
|
const F & |
interrupt |
|
) |
| |
|
inlinestatic |
Solve for a spring filter given input data data and result must both be of length size initial displacement and initial velocity are passed in manually
Definition at line 123 of file CL_Spring.h.
Spring solver for realtime data Must provide a lambda (get_data) which returns the data value given the result index
- Returns
- bool - whether or not the solution is steady
-
d1, d2 - output parameters d1 and d2 are updated in place
Definition at line 166 of file CL_Spring.h.
The documentation for this class was generated from the following file: