25class VisibilitySystem :
public System {
32 VisibilitySystem() =
default;
33 ~VisibilitySystem()
override =
default;
35 VisibilitySystem(
const VisibilitySystem& other) =
delete;
36 VisibilitySystem& operator=(
const VisibilitySystem& other) =
delete;
38 VisibilitySystem(VisibilitySystem && other) =
delete;
39 VisibilitySystem& operator=(VisibilitySystem && other) =
delete;
51 struct ObjectSources {
52 uint64_t sceneEpoch = 0;
53 uint64_t assetEpoch = 0;
54 uint64_t meshAssets = 0;
55 uint64_t materialAssets = 0;
57 bool throughAnEye =
false;
59 bool operator==(
const ObjectSources& other)
const {
60 return sceneEpoch == other.sceneEpoch && assetEpoch == other.assetEpoch
61 && meshAssets == other.meshAssets && materialAssets == other.materialAssets
62 && sea == other.sea && throughAnEye == other.throughAnEye;
65 bool operator!=(
const ObjectSources& other)
const {
return !(*
this == other); }
73 struct ObjectMemberships {
74 uint64_t transforms = 0;
75 uint64_t worldTransforms = 0;
78 bool operator==(
const ObjectMemberships& other)
const {
79 return transforms == other.transforms && worldTransforms == other.worldTransforms
80 && lods == other.lods;
83 bool operator!=(
const ObjectMemberships& other)
const {
return !(*
this == other); }
99 bool resolveCamera(
const FrameContext& ctx,
float viewportAspect);
111 const Camera& camera,
112 const glm::vec3& position,
113 const glm::quat& rotation,
114 float viewportAspect,
119 EntityId m_cachedCameraEntity{};
120 uint64_t m_cameraEpoch = 0;
122 bool m_noCameraLogged =
false;
124 std::vector<uint8_t> m_state;
127 std::vector<uint8_t> m_fixed;
128 std::vector<uint64_t> m_stamps;
130 ObjectSources m_sources;
131 ObjectMemberships m_memberships;
132 bool m_sourcesValid =
false;
133 uint32_t m_checkPhase = 0;
134 uint32_t m_lastTotal = 0;
135 uint64_t m_plantsRevision = 0;
136 uint32_t m_plantFirst = 0;
137 uint32_t m_plantCount = 0;
140 uint64_t m_fixedMovedEpoch = UINT64_MAX;
Per-frame state bundle passed to every system.
Definition system.h:57