Finality Engine
Loading...
Searching...
No Matches
LODGroup.h
Go to the documentation of this file.
1
11#pragma once
12#include <glm/glm.hpp>
13#include <vector>
14#include <cstdint>
15#include <Core/Core.h>
16#include <entt.hpp>
17
18namespace FINALITY
19{
20 class Scene;
21
23 struct LODLevel
24 {
26 std::vector<uint64_t> Renderers;
27 };
28
39 {
40 bool Enabled = true;
41 bool AutoBounds = true;
42 glm::vec3 LocalCenter{0};
43 float LocalSize = 1.0f;
44 float Hysteresis = 0.05f;
45 std::vector<LODLevel> Levels{{0.6f,{}},{0.3f,{}},{0.01f,{}}};
46 };
47
49 FAPI bool RecalculateLODBounds(Scene& scene, entt::entity entity);
50}
#define FAPI
Definition Core.h:22
Owns entities and dispatches script simulation.
Definition Scene.h:36
bool RecalculateLODBounds(Scene &scene, entt::entity entity)
void NormalizeLODGroup(LODGroupComponent &group)
Stores authored level-of-detail thresholds and renderer membership.
Definition LODGroup.h:39
std::vector< LODLevel > Levels
Definition LODGroup.h:45
One screen-relative LOD threshold and its renderer entity UUIDs.
Definition LODGroup.h:24
float ScreenRelativeHeight
Definition LODGroup.h:25
std::vector< uint64_t > Renderers
Definition LODGroup.h:26