Toast Engine
Loading...
Searching...
No Matches
input::DeadzoneModifier Class Reference

Zeroes input below a lower threshold and remaps the rest to [0, 1]. More...

#include <modifier.hpp>

Inheritance diagram for input::DeadzoneModifier:
Collaboration diagram for input::DeadzoneModifier:

Public Member Functions

 DeadzoneModifier (const toml::table &t)
void apply (Value &value, const EvalContext &) override
 Transforms a value in place.
auto name () const -> std::string_view override
Public Member Functions inherited from input::IModifier
 IModifier (const IModifier &)=default
auto operator= (const IModifier &) -> IModifier &=default

Additional Inherited Members

Static Public Member Functions inherited from input::IModifier
static auto fromToml (const toml::table &table) -> std::shared_ptr< IModifier >
 Builds a modifier from a TOML table keyed by its "name" field.

Detailed Description

Zeroes input below a lower threshold and remaps the rest to [0, 1].

Member Function Documentation

◆ apply()

void input::DeadzoneModifier::apply ( Value & value,
const EvalContext & ctx )
inlineoverridevirtual

Transforms a value in place.

Parameters
valueThe value to modify; its type tag is preserved
ctxFrame context, used by the key and delta-time modifiers

Implements input::IModifier.

◆ name()

auto input::DeadzoneModifier::name ( ) const -> std::string_view
inlinenodiscardoverridevirtual
Returns
The modifier's TOML name

Implements input::IModifier.


The documentation for this class was generated from the following file: