Antkeeper  0.0.1
Public Member Functions | Public Attributes | List of all members
input::mouse_scroll_mapping Class Reference

Maps a direction along a mouse scroll axis to a control input value. More...

#include <mapping.hpp>

Inheritance diagram for input::mouse_scroll_mapping:
input::mapping

Public Member Functions

constexpr mapping_type get_mapping_type () const noexcept override
 Returns mapping_type::mouse_scroll. More...
 
 mouse_scroll_mapping (input::mouse *mouse, mouse_scroll_axis axis, bool direction)
 Constructs a mouse scroll mapping. More...
 
 mouse_scroll_mapping ()=default
 Constructs a mouse scroll mapping. More...
 
- Public Member Functions inherited from input::mapping
 mapping ()=default
 Constructs an input mapping. More...
 
virtual ~mapping ()=default
 Destructs an input mapping. More...
 

Public Attributes

input::mousemouse {nullptr}
 Pointer to the mapped mouse, or nullptr if input from any mouse is accepted. More...
 
mouse_scroll_axis axis {0}
 Mapped mouse scroll axis. More...
 
bool direction {false}
 Sign bit of the mapped direction. More...
 

Detailed Description

Maps a direction along a mouse scroll axis to a control input value.

Definition at line 226 of file mapping.hpp.

Constructor & Destructor Documentation

◆ mouse_scroll_mapping() [1/2]

input::mouse_scroll_mapping::mouse_scroll_mapping ( input::mouse mouse,
mouse_scroll_axis  axis,
bool  direction 
)

Constructs a mouse scroll mapping.

Parameters
controlControl to which input will be mapped.
mousePointer to the mouse to map, or nullptr if input from any mouse will be mapped.
axisMouse scroll axis to map.
directionSign bit of the direction to map.

Definition at line 57 of file mapping.cpp.

◆ mouse_scroll_mapping() [2/2]

input::mouse_scroll_mapping::mouse_scroll_mapping ( )
default

Constructs a mouse scroll mapping.

Parameters
controlControl to which input will be mapped.
mousePointer to the mouse to map, or nullptr if input from any mouse will be mapped.
axisMouse scroll axis to map.
directionSign bit of the direction to map.

Member Function Documentation

◆ get_mapping_type()

constexpr mapping_type input::mouse_scroll_mapping::get_mapping_type ( ) const
inlineconstexproverridevirtualnoexcept

Returns mapping_type::mouse_scroll.

Implements input::mapping.

Definition at line 243 of file mapping.hpp.

Member Data Documentation

◆ axis

mouse_scroll_axis input::mouse_scroll_mapping::axis {0}

Mapped mouse scroll axis.

Definition at line 252 of file mapping.hpp.

◆ direction

bool input::mouse_scroll_mapping::direction {false}

Sign bit of the mapped direction.

Definition at line 255 of file mapping.hpp.

◆ mouse

input::mouse* input::mouse_scroll_mapping::mouse {nullptr}

Pointer to the mapped mouse, or nullptr if input from any mouse is accepted.

Definition at line 249 of file mapping.hpp.


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