SpiecsEngine
 
Loading...
Searching...
No Matches
WorldMarkQuerier.cpp
Go to the documentation of this file.
1/**
2* @file WorldMarkQuerier.cpp.
3* @brief The WorldMarkQuerier & NativeScriptRegister Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9#include "Render/FrameInfo.h"
10#include "World/World/World.h"
11#include "Core/Event/WorldEvent.h"
12#include "Render/Vulkan/VulkanRenderBackend.h"
13
14namespace Spices {
15
17 {
19
20 World::WorldMarkFlags mark = FrameInfo::Get().m_World->GetMarker();
21
22 if (mark & World::MeshAddedToWorld)
23 {
26
27 FrameInfo::Get().m_World->ClearMarkerWithBits(World::MeshAddedToWorld);
28 }
29
30 if (mark & World::FrushStableFrame)
31 {
32 FrameInfo::Get().m_World->ViewComponent<CameraComponent>([](auto e, auto& comp) {
33
34 if (comp.IsActive())
35 {
36 comp.GetCamera()->ResetStableFrames();
37 }
38
39 return false;
40 });
41
42 FrameInfo::Get().m_World->ClearMarkerWithBits(World::FrushStableFrame);
43 }
44 }
45}
#define SPICES_PROFILE_ZONE
CameraComponent Class. This class defines the specific behaves of CameraComponent.
static EventCallbackFn GetEventCallbackFn()
Get Global Root Event Function Pointer.
Definition Event.cpp:17
This Class is the basic Event Class. Inherit from it and create specific event class.
Definition Event.h:96
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
This Class is inherited from Event Class.
Definition WorldEvent.h:43
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22
virtual void OnTick(TimeStep &ts) override
This interface defines the behave on specific component tick every frame.
Script of handle world mark.
uint32_t WorldMarkFlags
Definition World.h:53
@ FrushStableFrame
Definition World.h:48
@ MeshAddedToWorld
Definition World.h:47
World Class. This class defines the basic behaves of World. When we create an new world,...
Definition World.h:41