Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
VrCameraComponent.h
Go to the documentation of this file.
1#pragma once
2
4
6{
7 class Headset;
8} // namespace Engine::Rendering
9
10namespace Engine::Components {
22public:
23 static constexpr bool IsUnique = true;
24 static constexpr const char* ComponentName = "VrCamera";
25
27 std::shared_ptr<Entities::SceneNode> sceneNode,
28 Rendering::Headset* headset);
29
30 ~VrCamera() override = default;
31
32 void tick(double deltaTime) override;
33
34 [[nodiscard]] glm::mat4 getEyeViewMatrix(size_t eyeIndex) const override;
35 [[nodiscard]] glm::mat4 getEyeProjectionMatrix(size_t eyeIndex) const override;
36
37 [[nodiscard]] Rendering::Headset* getHeadset() const { return headset_; }
38
39private:
41};
42
43} // namespace EngineCore
A camera component that provides view and projection matrices based on its SceneNode transform....
static constexpr const char * ComponentName
~VrCamera() override=default
glm::mat4 getEyeProjectionMatrix(size_t eyeIndex) const override
Gets the projection matrix for a specific eye. Base returns getProjectionMatrix() for both (mono).
Rendering::Headset * getHeadset() const
void tick(double deltaTime) override
Called every frame if ticking is enabled.
glm::mat4 getEyeViewMatrix(size_t eyeIndex) const override
Gets the view matrix for a specific eye. Base returns getViewMatrix() for both (mono).
static constexpr bool IsUnique
Rendering::Headset * headset_
VrCamera(Entities::Scene *owningScene, std::shared_ptr< Entities::SceneNode > sceneNode, Rendering::Headset *headset)
A scene is the overarching structure which can spawn, contain and destroy actors or entities.
Definition Scene.h:56