CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Range.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Input.hpp"
11
13
14namespace CeresEngine {
15
16 class InputState;
17
18 class CE_SCRIPT_EXPORT(storage = "ref") InputRange {
19 public:
22 double value = 0.0;
23
24 public:
27
28 public:
32
33 public: // Updating
36 virtual void update(const InputState& state) = 0;
37
41 void updateValue(double value);
42 };
43
59
61 private:
64
66 double lastValue = 0.0;
67
69 bool receivedFirstUpdate = false;
70
71 public:
77
78 public: // Updating
80 void update(const InputState& state) final;
81 };
82
85
86} // namespace CeresEngine
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Definition Range.hpp:44
Axis axis
The axis to update from.
Definition Range.hpp:47
Definition Range.hpp:60
Axis axis
The axis to update from.
Definition Range.hpp:63
Definition Range.hpp:18
Definition InputState.hpp:20
Definition Range.hpp:84
Definition Application.hpp:19
Axis
A enumeration of known axes.
Definition Input.hpp:400
struct CeresEngine::GLState state
Axis axis(const StringView &str) noexcept
Returns the Axis constant that is represented by str.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition Span.hpp:668