SolarSim
Loading...
Searching...
No Matches
solarsim::Engine Class Reference

Main engine class managing core systems and game loop. More...

#include <engine.hpp>

Public Member Functions

 Engine (const Engine &)=delete
Engineoperator= (const Engine &)=delete
void run ()
 Start the main game loop.
const Windowwindow () const
Windowwindow ()
const Rendererrenderer () const
Rendererrenderer ()
const InputSysteminputManager () const
InputSysteminputManager ()
const PhysicsSystemphysicsSystem () const
PhysicsSystemphysicsSystem ()

Static Public Member Functions

static Engineget ()
 Get the singleton engine instance.
static std::optional< EntitygetPrimaryCamera (Registry &registry)
 Find the primary camera entity in the registry.

Private Member Functions

 Engine ()
 ~Engine ()
void init ()
 Initialize all engine subsystems.

Private Attributes

Window m_window
Renderer m_renderer
InputSystem m_inputSystem
PhysicsSystem m_physicsSystem

Detailed Description

Main engine class managing core systems and game loop.

Constructor & Destructor Documentation

◆ Engine() [1/2]

solarsim::Engine::Engine ( const Engine & )
delete

◆ Engine() [2/2]

solarsim::Engine::Engine ( )
private

◆ ~Engine()

solarsim::Engine::~Engine ( )
private

Member Function Documentation

◆ get()

Engine & solarsim::Engine::get ( )
inlinestatic

Get the singleton engine instance.

Returns
Engine& Reference to the engine instance

◆ getPrimaryCamera()

std::optional< Entity > solarsim::Engine::getPrimaryCamera ( Registry & registry)
static

Find the primary camera entity in the registry.

Parameters
registryThe registry to search in
Returns
std::optional<Entity> The primary camera entity if found
Note
Looks for CameraComponent with primary=true

◆ init()

void solarsim::Engine::init ( )
private

Initialize all engine subsystems.

– INIT IMGUI CONTEXT –

◆ inputManager() [1/2]

InputSystem & solarsim::Engine::inputManager ( )
inline

Non-const getter for the input management system

◆ inputManager() [2/2]

const InputSystem & solarsim::Engine::inputManager ( ) const
inline

Const getter for the input management system

◆ operator=()

Engine & solarsim::Engine::operator= ( const Engine & )
delete

◆ physicsSystem() [1/2]

PhysicsSystem & solarsim::Engine::physicsSystem ( )
inline

Non-const getter for the physics system

◆ physicsSystem() [2/2]

const PhysicsSystem & solarsim::Engine::physicsSystem ( ) const
inline

Const getter for the physics system

◆ renderer() [1/2]

Renderer & solarsim::Engine::renderer ( )
inline

Non-const getter for the renderingsystem

◆ renderer() [2/2]

const Renderer & solarsim::Engine::renderer ( ) const
inline

Const getter for the renderingsystem

◆ run()

void solarsim::Engine::run ( )

Start the main game loop.

Note
This method blocks until the application exits

◆ window() [1/2]

Window & solarsim::Engine::window ( )
inline

Non-const getter for the window management system

◆ window() [2/2]

const Window & solarsim::Engine::window ( ) const
inline

Const getter for the window management system

Field Documentation

◆ m_inputSystem

InputSystem solarsim::Engine::m_inputSystem
private

Input processing system

◆ m_physicsSystem

PhysicsSystem solarsim::Engine::m_physicsSystem
private

Physics handling system

◆ m_renderer

Renderer solarsim::Engine::m_renderer
private

Rendering system

◆ m_window

Window solarsim::Engine::m_window
private

Window management system


The documentation for this class was generated from the following files: