SpiecsEngine
 
Loading...
Searching...
No Matches
FrameInfo.h
Go to the documentation of this file.
1/**
2* @file FrameInfo.h.
3* @brief The FrameInfo Class Definitions.
4* @author Spices.
5*/
6
7#pragma once
8#include "Core/Core.h"
9#include "Resources/Mesh/Mesh.h"
10
11// STL Header.
12#include <memory>
13
14namespace Spices {
15
16 /**
17 * @brief Forward Declare.
18 */
19 class World;
20
21 enum class RendererType
22 {
25 };
26
27 /**
28 * @brief FrameInfo Class.
29 * This class defines the FrameInfo data.
30 */
32 {
33 public:
34
35 /**
36 * @brief Constructor Function.
37 */
38 FrameInfo() = default;
39
40 /**
41 * @brief Destructor Function.
42 */
43 virtual ~FrameInfo() = default;
44
45 /**
46 * @brief Copy Constructor Function.
47 * @note This Class not allowed copy behaves.
48 */
49 FrameInfo(const FrameInfo&) = delete;
50
51 /**
52 * @brief Copy Assignment Operation.
53 * @note This Class not allowed copy behaves.
54 */
55 FrameInfo& operator=(const FrameInfo&) = delete;
56
57 /**
58 * @brief Get FrameInfo.
59 * @return Returns static FrameInfo reference.
60 */
61 static FrameInfo& Get();
62
63 public:
64
65 /**
66 * @brief FrameIndex, varying during 0 - (MaxFrameInFlight - 1).
67 * Used almost anywhere.
68 */
69 uint32_t m_FrameIndex = 0;
70
71 /**
72 * @brief ImageIndex, varying during 0 - (MaxFrameInFlight - 1).
73 * Used in swapchain index and framebuffer index.
74 */
75 uint32_t m_ImageIndex = 0;
76
77 /**
78 * @breif A container of mouse picked entity id.
79 * key means entity id.
80 * value entity tag 0
81 */
83
84 /**
85 * @brief Identify of selected material.
86 * @note The first value is entity index, the second value is mesh pack index.
87 * @attention Not support multiple mesh component in one entity.
88 */
89 uint32_t m_PickMaterial = 0;
90
91 /**
92 * @brief The shared pointer of specific world.
93 */
94 std::shared_ptr<World> m_World;
95
96 /**
97 * @brief The renderer type of current world.
98 */
100 };
101}
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
#define SPICES_PROFILE_FRAME
virtual ~Application()
Destructor Function.
Application()
Constructor Function.
static void Run()
Run Our World.
Application Class. Our Engine Start here.
Definition Application.h:20
uint32_t m_PickMaterial
Identify of selected material.
Definition FrameInfo.h:89
FrameInfo(const FrameInfo &)=delete
Copy Constructor Function.
uint32_t m_FrameIndex
FrameIndex, varying during 0 - (MaxFrameInFlight - 1). Used almost anywhere.
Definition FrameInfo.h:69
FrameInfo & operator=(const FrameInfo &)=delete
Copy Assignment Operation.
virtual ~FrameInfo()=default
Destructor Function.
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
std::shared_ptr< World > m_World
The shared pointer of specific world.
Definition FrameInfo.h:94
scl::linked_unordered_map< int, std::string > m_PickEntityID
Definition FrameInfo.h:82
RendererType m_RendererType
The renderer type of current world.
Definition FrameInfo.h:99
FrameInfo()=default
Constructor Function.
uint32_t m_ImageIndex
ImageIndex, varying during 0 - (MaxFrameInFlight - 1). Used in swapchain index and framebuffer index.
Definition FrameInfo.h:75
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
static void Init()
Init Log.
Definition Log.cpp:24
static void ShutDown()
Shutdown Log.
Definition Log.cpp:82
NativeScriptSystem Class. This class defines the specific behaves of NativeScriptSystem.
ResourceSystem Class. This class defines the specific behaves of RenderSystem.
ResourceSystem Class. Handles resource load/unload event.
SlateSystem Class. This class defines the specific behaves of SlateSystem.
Definition SlateSystem.h:21
SystemManager()
Constructor Function.
static SystemManager & Get()
Get Static SystemManager.
SystemManager & PopSystem(const std::string &systemName)
Push a system to this manager.
SystemManager Class. This class defines the behave of SystemManager.
void Flush()
Refresh time in each engine loop.
Definition TimeStep.cpp:26
const uint64_t & fs() const
Get frames count.
Definition TimeStep.h:63
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22
static VulkanState & GetState()
Get VulkanState in use.
This class defines the render backend behaves of Vulkan.
World Class. This class defines the basic behaves of World. When we create an new world,...
Definition World.h:41
The container combines hashmap and list together. Used in the case that we want iter a hashmap in ord...
RendererType
Definition FrameInfo.h:22