CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::DeltaAxisInputRange Class Referencefinal

#include <CeresEngine/Input/Range.hpp>

Inheritance diagram for CeresEngine::DeltaAxisInputRange:
CeresEngine::InputRange

Public Member Functions

 DeltaAxisInputRange (Axis axis) noexcept
 Create a new delta axis range by fetching data from the given axis.
 
void update (const InputState &state) final
 Updates the range with the given input state.
 
- Public Member Functions inherited from CeresEngine::InputRange
virtual ~InputRange ()=default
 Defaulted virtual destructor.
 
 operator double () const noexcept
 A double conversion operator.
 

Private Attributes

Axis axis
 The axis to update from.
 
double lastValue = 0.0
 The value returned on the last update.
 
bool receivedFirstUpdate = false
 A flag that indicates if the first result was already received.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::InputRange
double value = 0.0
 The range value.
 
- Protected Member Functions inherited from CeresEngine::InputRange
void updateValue (double value)
 Updates the range value.
 

Constructor & Destructor Documentation

◆ DeltaAxisInputRange()

CeresEngine::DeltaAxisInputRange::DeltaAxisInputRange ( Axis  axis)
explicitnoexcept

Create a new delta axis range by fetching data from the given axis.

Parameters
axisThe axis to fetch data from

Member Function Documentation

◆ update()

void CeresEngine::DeltaAxisInputRange::update ( const InputState state)
finalvirtual

Updates the range with the given input state.

Parameters
stateThe input state to update the range with

Implements CeresEngine::InputRange.

Member Data Documentation

◆ axis

Axis CeresEngine::DeltaAxisInputRange::axis
private

The axis to update from.

◆ lastValue

double CeresEngine::DeltaAxisInputRange::lastValue = 0.0
private

The value returned on the last update.

◆ receivedFirstUpdate

bool CeresEngine::DeltaAxisInputRange::receivedFirstUpdate = false
private

A flag that indicates if the first result was already received.


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