|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
Tracks mouse scroll-wheel state and converts it into axis-like values consumable by the input mapping system. More...
#include <WheelHandler.h>
Public Member Functions | |
| WheelHandler (std::shared_ptr< Window > window) | |
| Constructs a WheelHandler with default (zero) state. | |
| ~WheelHandler () | |
| Destructor. | |
| void | Update () |
| Samples the latest wheel data from the window back-end. | |
| CoordsF | GetCoords () |
| Returns the raw scroll-wheel coordinates for the current frame. | |
| WheelDirections | GetDirections () |
| Returns the current horizontal and vertical scroll directions. | |
| float | GetDirectionValue (WheelDirection direction) |
| Returns the instantaneous direction value for the given wheel direction. | |
| float | GetBufferedDirectionValue (WheelDirection direction) |
| Returns the buffered (smoothed) direction value for the given wheel direction. | |
Tracks mouse scroll-wheel state and converts it into axis-like values consumable by the input mapping system.
Call Update() once per frame to sample the latest wheel data from the window back-end. The resulting direction values and buffered values can then be queried by MouseWheelToAxisDirectionMapping and related classes.
| Ship::WheelHandler::WheelHandler | ( | std::shared_ptr< Window > | window | ) |
Constructs a WheelHandler with default (zero) state.
| Ship::WheelHandler::~WheelHandler | ( | ) |
Destructor.
| float Ship::WheelHandler::GetBufferedDirectionValue | ( | WheelDirection | direction | ) |
Returns the buffered (smoothed) direction value for the given wheel direction.
| direction | The wheel direction to query. |
| CoordsF Ship::WheelHandler::GetCoords | ( | ) |
Returns the raw scroll-wheel coordinates for the current frame.
| WheelDirections Ship::WheelHandler::GetDirections | ( | ) |
Returns the current horizontal and vertical scroll directions.
| float Ship::WheelHandler::GetDirectionValue | ( | WheelDirection | direction | ) |
Returns the instantaneous direction value for the given wheel direction.
| direction | The wheel direction to query. |
| void Ship::WheelHandler::Update | ( | ) |
Samples the latest wheel data from the window back-end.