Class Engine::CameraPlugin¶
ClassList > Engine > CameraPlugin
Plugin that bundles the CameraComponent andCameraSystem .
#include <CameraPlugin.hpp>
Inherits the following classes: Engine::IPlugin
Public Functions¶
| Type | Name |
|---|---|
| virtual void | Init (Registry & registry) override Initializes the CameraPlugin by registering theCameraComponent andCameraSystem . Also registersPosition , which the camera uses as the point it looks at. |
Public Functions inherited from Engine::IPlugin¶
See Engine::IPlugin
| Type | Name |
|---|---|
| virtual void | Init (Registry & registry) = 0 Initializes the plugin, registering components and systems. |
| virtual | ~IPlugin () = default |
Public Static Functions¶
| Type | Name |
|---|---|
| void | AttachToEntity (Registry & registry, Entity entity, const CameraComponent & camera) Attaches a CameraComponent to an entity and ensures it has aPosition . An existingPosition is left untouched. |
Public Functions Documentation¶
function Init¶
Initializes the CameraPlugin by registering theCameraComponent andCameraSystem . Also registersPosition , which the camera uses as the point it looks at.
Parameters:
registryThe ECS registry.
Implements Engine::IPlugin::Init
Public Static Functions Documentation¶
function AttachToEntity¶
Attaches a CameraComponent to an entity and ensures it has aPosition . An existingPosition is left untouched.
static void Engine::CameraPlugin::AttachToEntity (
Registry & registry,
Entity entity,
const CameraComponent & camera
)
Parameters:
registryThe ECS registry.entityThe entity to attach the camera to.cameraThe camera component to attach.
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Plugins/CameraPlugin.hpp