Asset representing a single haptic effect loaded from a .thaptic file.
More...
#include <haptic.hpp>
|
|
| Haptic (const toml::table &table, Handle< Schema > schema={}) |
| auto | type () const -> std::string_view override |
|
auto | mode () const noexcept -> HapticMode |
|
auto | priority () const noexcept -> int |
|
auto | durationMs () const noexcept -> uint32_t |
| auto | sample (float t) const -> glm::vec2 |
| | Samples the effect's motor intensities at a normalized playback time.
|
|
| Data (const toml::table &table, Handle< Schema > schema={}) |
|
| Data (const toml::table &table, Handle< Schema > schema, KeepAllKeysTag) |
| | Stores the schema handle for round-trip serialization but runs free-form buildRoot, keeping every TOML key.
|
|
auto | operator[] (std::string_view k) -> DataValue & |
|
auto | operator[] (std::string_view k) const -> const DataValue & |
|
auto | contains (std::string_view k) const -> bool |
|
auto | root () const -> const DataValue & |
|
auto | schema () const -> const Handle< Schema > & |
| auto | serialize (SaveMode mode) const -> std::vector< uint8_t > override |
| virtual void | reload (const toml::table &table) |
| | Re-parses the asset contents in place.
|
|
| Asset (const Asset &)=delete |
|
auto | operator= (const Asset &) -> Asset &=delete |
|
auto | refCount () const noexcept -> uint32_t |
|
| void | onReloaded () override |
|
void | addRef () noexcept |
|
void | release () noexcept |
Asset representing a single haptic effect loaded from a .thaptic file.
◆ onReloaded()
| void assets::Haptic::onReloaded |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ sample()
| auto assets::Haptic::sample |
( |
float | t | ) |
const -> glm::vec2 |
|
nodiscard |
Samples the effect's motor intensities at a normalized playback time.
- Parameters
-
| t | Normalized playback time in [0, 1] |
- Returns
- {left, right} motor intensities in [0, 1]
◆ type()
| auto assets::Haptic::type |
( |
| ) |
const -> std::string_view |
|
inlinenodiscardoverridevirtual |
The documentation for this class was generated from the following files:
- engine/src/toast/input/assets/haptic.hpp
- engine/src/toast/input/assets/haptic.cpp