Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
DebugCameraActor.h
1#pragma once
2
3#include "Engine/Entity/Actor.h"
4
5#include <glm/vec3.hpp>
6
7namespace Engine::Components
8{
9 class Camera;
10} // namespace Engine::Components
11
12namespace Engine::Entities
13{
14 class Scene;
15
19 class DebugCameraActor final : public Actor
20 {
21 public:
32 [[nodiscard]] static DebugCameraActor * spawn(
33 Scene & scene,
34 const glm::vec3 & position,
35 const glm::vec3 & facing,
36 float fov = 60.0f,
37 float nearPlane = 0.01f,
38 float farPlane = 1000.0f
39 );
40
42 const SpawnContext & context,
43 float fov,
44 float nearPlane,
45 float farPlane
46 );
47
48 void beginPlay() override;
49
50 private:
52 };
53} // namespace Engine::Entities
A camera component that provides view and projection matrices based on its SceneNode transform....
friend class Scene
Definition Actor.h:72
Actor(const SpawnContext &context)
Creates an actor from a scene spawn context.
DebugCameraActor(const SpawnContext &context, float fov, float nearPlane, float farPlane)
void beginPlay() override
Gets executed when the actor is spawned into the world.
static DebugCameraActor * spawn(Scene &scene, const glm::vec3 &position, const glm::vec3 &facing, float fov=60.0f, float nearPlane=0.01f, float farPlane=1000.0f)
Spawns an active camera at a position facing the supplied world-space direction.
Owns scene entities, actor lifetime, and the scene graph root.
Definition Scene.h:84
Scene ownership data passed to actor and component constructors during spawning.