Covellite++
Version: 2.3.2 Revision: 2584 Platform: x64 Build: 19:03 05.09.2026
Кроссплатформенный фреймворк для разработки приложений на С++
Toggle main menu visibility
Загрузка...
Поиск...
Не найдено
GameWorld.hpp
1
2
#pragma once
3
#include <queue>
4
#include <alicorn/std/string.forward.hpp>
5
#include <alicorn/boost/filesystem.forward.hpp>
6
#include <Covellite/Covellite.hpp>
7
#include "IGameWorld.hpp"
8
#include "GameObject.hpp"
9
#include "CubeCoords.hpp"
10
11
namespace
basement
12
{
13
14
namespace
model
15
{
16
17
class
DbComponents
;
18
34
class
GameWorld final :
35
public
IGameWorld
36
{
37
using
Updater_t = ::covellite::api::Updater_t;
38
using
Events_t =
::covellite::events::Events
;
39
using
IntPtr_t =
int
*;
40
using
Type_t = size_t;
41
42
public
:
43
// Интерфейс IGameWorld
44
GameScenePtr_t CreateGameScene(
void
)
override
;
45
float
GetLandscapeHeight(
const
CubeCoords
&)
const override
;
46
IGameObject::Landscape::Value GetGameObjectType(
const
CubeCoords
&)
const override
;
47
const
PointLights
& GetPointLights(
void
)
const override
;
48
SoundDevice & GetSoundDevice(
void
)
override
;
49
const
IDbComponents
& GetDbComponents(
void
)
const override
;
50
51
private
:
52
void
PrepareLanscapeScene(
const
IntPtr_t &);
53
void
PrepareAnimationScene(
const
IntPtr_t &);
54
void
PrepareShadowsScene(
const
IntPtr_t &,
const
GameObject::Another::Value);
55
void
RemoveAllObjects(
void
);
56
Updater_t GetAutoProcessMoving(
void
);
57
Updater_t GetManualProcessMoving(
void
);
58
59
private
:
60
void
LoadObject(
const
GameObject::IGameObjectPtr_t &,
const
Any_t & = Any_t{});
61
void
LoadObject(
const
GameObject::IGameObjectPtr_t &,
const
Updater_t &);
62
void
LoadObject(
const
GameObject::IGameObjectPtr_t &,
const
CubeCoords
&);
63
void
PrepareLoader(
const
IntPtr_t &);
64
void
PrepareLoader(
void
);
65
void
PrepareCamera(
void
);
66
void
PreparePlane(
void
);
67
void
PrepareExtensionPlane(
const
CubeCoords
&);
68
void
PrepareCompressionPlane(
const
CubeCoords
&);
69
Updater_t GetCellLoader(
const
CubeCoords
&);
70
Updater_t GetCellRemover(
const
CubeCoords
&);
71
float
GetHeight(
const
float
,
const
float
)
const
;
72
73
private
:
74
Events_t m_Events;
75
DbComponents
& m_DbComponents;
76
GameScenePtr_t m_pGameScene;
77
::std::queue<Updater_t> m_LoadingQueue;
78
Updater_t m_ProcessingMode = [](
const
float) {};
79
float
m_WindowX = 100.0f;
80
float
m_WindowY = 100.0f;
81
82
private
:
83
::std::shared_ptr<PointLights> m_pPointLights;
84
::std::shared_ptr<SoundDevice> m_pSoundDevice;
85
86
private
:
87
class
Step final
88
{
89
public
:
90
CubeCoords
m_ChangePosition;
91
CubeCoords
m_Orientation;
92
float
m_Pitch = 0.0f;
93
float
m_BeginTime = 0.0f;
94
};
95
96
CubeCoords
m_Position;
97
CubeCoords
m_Orientation{ 0, 1 };
98
float
m_Pitch = 0.0f;
99
::std::queue<Step> m_Steps;
100
::std::map<size_t, ::std::pair<GameObject::IGameObjectPtr_t, int>> m_LandscapeObjects;
101
::alicorn::extension::std::fast::unordered_map<uint64_t, int> m_ObjectTypes;
102
103
public
:
104
GameWorld(
const
Events_t &,
DbComponents
&);
105
~GameWorld(
void
)
noexcept
;
106
};
107
108
}
// namespace model
109
110
}
// namespace basement
basement
Определения
Common.hpp:10
covellite::events::Events
Класс входит в проект Covellite.Events Класс для работы с событиями фреймворка.
Определения
Events.hpp:36
basement::model::CubeCoords
Класс входит в проект Example Класс манипуляции кубическими координатами.
Определения
CubeCoords.hpp:26
basement::model::DbComponents
Класс входит в проект Example Класс реализации базы данных компонентов.
Определения
DbComponents.hpp:28
basement::model::IDbComponents
Класс входит в проект Example Интерфейсный класс базы данных компонентов.
Определения
IDbComponents.hpp:29
basement::model::IGameWorld
Класс входит в проект Example Интерфейсный класс игрового мира.
Определения
IGameWorld.hpp:34
basement::model::PointLights
Класс входит в проект Example Класс набора точечных источников света сцены.
Определения
PointLights.hpp:29
Solution
Solution
Example
Example
Basements
Demo
GameWorld.hpp
Документация по Covellite++. Последние изменения:
. Создано системой
1.18.0