|
OSSIA
Open Scenario System for Interactive Application
|
Applies one independent Filter per component of a vector-valued signal.
More...
Applies one independent Filter per component of a vector-valued signal.
The filters are owned per-component so that, for instance, the x of a tracked point never bleeds into its y - and, when used per tracked object, so that one object's history never bleeds into another's.
| N | How many components fit without allocating. |
Public Types | |
| using | filter_type = Filter |
| using | value_type = typename Filter::value_type |
Public Member Functions | |
| OSSIA_INLINE void | ensure (std::size_t n) |
Make sure there are exactly n components. | |
| OSSIA_INLINE void | configure () noexcept |
| Push the prototype's tuning onto the live filters, keeping their history. | |
| void | reset () noexcept |
| Forget every component's history, keeping the component count. | |
| void | clear () noexcept |
| Drop every component. | |
| template<typename... Args> | |
| OSSIA_INLINE void | operator() (value_type *v, std::size_t n, Args... args) noexcept |
Filter n components in place. | |
Public Attributes | |
| Filter | prototype {} |
| ossia::small_vector< Filter, N > | filters {} |
| One filter per component. | |
|
inline |
Make sure there are exactly n components.
A change of component count resets the temporal state: there is no meaningful way to map an old component onto a new one.
|
inlinenoexcept |
Filter n components in place.
| v | Components, modified in place. |
| n | How many. |
| args | Forwarded to each filter, e.g. the dt of a one_euro_filter. |
| Filter ossia::multi_filter< Filter, N >::prototype {} |
Copied into every new component. Set the parameters here, then call configure() to push them onto the components already in flight.