Lugdunum
0.1.0
include
lug
Core
FreeMovement.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
lug/Core/Export.hpp
>
4
#include <
lug/Graphics/Scene/Node.hpp
>
5
#include <
lug/Math/Vector.hpp
>
6
#include <
lug/Window/Window.hpp
>
7
#include <
lug/System/Time.hpp
>
8
9
namespace
lug
{
10
namespace
Core {
11
12
class
LUG_CORE_API
FreeMovement
{
13
public
:
14
explicit
FreeMovement
() =
default
;
15
~
FreeMovement
() =
default
;
16
20
void
setTargetNode(
lug::Graphics::Scene::Node
& target);
21
27
void
setEventSource(
lug::Window::Window
& eventSource);
28
29
void
onFrame(
const
System::Time
& elapsedTime);
30
31
private
:
32
lug::Graphics::Scene::Node
* _target{
nullptr
};
33
lug::Window::Window
* _eventSource{
nullptr
};
34
float
_speed{0.005f};
35
36
bool
_hasFocus{
false
};
37
Math::Vec2i _lastMousePos{0, 0};
38
};
39
40
#include <
lug/Core/FreeMovement.inl
>
41
42
}
// Core
43
}
// lug
44
Export.hpp
Node.hpp
lug::Graphics::Scene::Node
Definition:
Node.hpp:27
lug::Window::Window
Class for window.
Definition:
Window.hpp:59
Time.hpp
lug::Core::FreeMovement
Definition:
FreeMovement.hpp:12
Window.hpp
FreeMovement.inl
lug::System::Time
Definition:
Time.hpp:9
lug
Definition:
Application.hpp:11
Vector.hpp
LUG_CORE_API
#define LUG_CORE_API
Definition:
Export.hpp:11
Generated by
1.8.13