VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
appOptions.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers on 05.09.2025.
5//
6#pragma once
7
8#include <functional>
9#include <vector>
10
12#include "input/elementInput.h"
19#include "xr/xrManager.h"
20
21namespace visutwin::canvas
22{
23 class Engine;
24 class IComponentSystem;
25
26 /*
27 * AppOptions holds configuration settings utilized in the creation of an {@link AppBase} instance
28 */
30 {
31 using ComponentSystemCreator = std::function<std::unique_ptr<IComponentSystem>(Engine*)>;
32
33 template <class ComponentSystem>
35 componentSystems.emplace_back([](Engine* engine) {
36 return std::make_unique<ComponentSystem>(engine);
37 });
38 }
39
40 // The component systems the app requires
41 std::vector<ComponentSystemCreator> componentSystems;
42
43 std::shared_ptr<GraphicsDevice> graphicsDevice;
44
45 std::vector<std::string> scriptsOrder;
46 std::string scriptPrefix;
47
48 std::shared_ptr<Lightmapper> lightmapper;
49
50 std::shared_ptr<BatchManager> batchManager;
51
52 std::shared_ptr<Keyboard> keyboard;
53 std::shared_ptr<Mouse> mouse;
54 std::shared_ptr<GamePads> gamepads;
55 std::shared_ptr<TouchDevice> touch;
56 std::shared_ptr<ElementInput> elementInput;
57 std::shared_ptr<XrManager> xr;
58 };
59}
Central application orchestrator managing scenes, rendering, input, and resource loading.
Definition engine.h:38
std::vector< ComponentSystemCreator > componentSystems
Definition appOptions.h:41
std::shared_ptr< ElementInput > elementInput
Definition appOptions.h:56
std::shared_ptr< XrManager > xr
Definition appOptions.h:57
std::shared_ptr< Mouse > mouse
Definition appOptions.h:53
std::shared_ptr< BatchManager > batchManager
Definition appOptions.h:50
std::vector< std::string > scriptsOrder
Definition appOptions.h:45
std::shared_ptr< GamePads > gamepads
Definition appOptions.h:54
std::shared_ptr< GraphicsDevice > graphicsDevice
Definition appOptions.h:43
std::shared_ptr< Keyboard > keyboard
Definition appOptions.h:52
std::shared_ptr< TouchDevice > touch
Definition appOptions.h:55
std::shared_ptr< Lightmapper > lightmapper
Definition appOptions.h:48
std::function< std::unique_ptr< IComponentSystem >(Engine *)> ComponentSystemCreator
Definition appOptions.h:31