Nameless Engine
Loading...
Searching...
No Matches
EditorCameraNode.h
1#pragma once
2
3// Custom.
4#include "game/nodes/CameraNode.h"
5
6namespace ne {
8 class EditorCameraNode : public CameraNode {
9 public:
11
17 EditorCameraNode(const std::string& sNodeName);
18
19 virtual ~EditorCameraNode() override = default;
20
26 void setIgnoreInput(bool bIgnore);
27
28 protected:
40 virtual void onBeforeNewFrame(float timeSincePrevFrameInSec) override;
41
52 virtual void onMouseMove(double xOffset, double yOffset) override;
53
67 virtual void onAfterAttachedToNewParent(bool bThisNodeBeingAttached) override;
68
69 private:
71 glm::vec3 lastInputDirection = glm::vec3(0.0F, 0.0F, 0.0F);
72
75
81
87 bool bIgnoreInput = true;
88
90 static constexpr double rotationSensitivity = 0.1; // NOLINT: default value
91
93 static constexpr float movementSpeed = 5.0F;
94
96 static constexpr float speedIncreaseMultiplier = 2.0F;
97
99 static constexpr float speedDecreaseMultiplier = 0.5F;
100 };
101}
Definition: CameraNode.h:11
Definition: EditorCameraNode.h:8
virtual void onAfterAttachedToNewParent(bool bThisNodeBeingAttached) override
Definition: EditorCameraNode.cpp:129
virtual void onBeforeNewFrame(float timeSincePrevFrameInSec) override
Definition: EditorCameraNode.cpp:89
float currentMovementSpeed
Definition: EditorCameraNode.h:74
static constexpr double rotationSensitivity
Definition: EditorCameraNode.h:90
static constexpr float speedIncreaseMultiplier
Definition: EditorCameraNode.h:96
void setIgnoreInput(bool bIgnore)
Definition: EditorCameraNode.cpp:67
float currentMovementSpeedMultiplier
Definition: EditorCameraNode.h:80
bool bIgnoreInput
Definition: EditorCameraNode.h:87
static constexpr float speedDecreaseMultiplier
Definition: EditorCameraNode.h:99
virtual void onMouseMove(double xOffset, double yOffset) override
Definition: EditorCameraNode.cpp:115
glm::vec3 lastInputDirection
Definition: EditorCameraNode.h:71
static constexpr float movementSpeed
Definition: EditorCameraNode.h:93
std::string sNodeName
Definition: Node.h:779