From 45af29da8095af16729955117a165d23e77cd740 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 19 May 2022 17:00:06 +0200 Subject: Add a new HashSet template * Intended to replace RBSet in most cases. * Optimized for iteration speed --- servers/rendering/renderer_scene_cull.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'servers/rendering/renderer_scene_cull.h') diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h index c5325ef30a..60983f9944 100644 --- a/servers/rendering/renderer_scene_cull.h +++ b/servers/rendering/renderer_scene_cull.h @@ -443,7 +443,7 @@ public: float visibility_range_end_margin = 0.0f; RS::VisibilityRangeFadeMode visibility_range_fade_mode = RS::VISIBILITY_RANGE_FADE_DISABLED; Instance *visibility_parent = nullptr; - RBSet visibility_dependencies; + HashSet visibility_dependencies; uint32_t visibility_dependencies_depth = 0; float transparency = 0.0f; Scenario *scenario = nullptr; @@ -579,16 +579,16 @@ public: struct InstanceGeometryData : public InstanceBaseData { RendererSceneRender::GeometryInstance *geometry_instance = nullptr; - RBSet lights; + HashSet lights; bool can_cast_shadows; bool material_is_animated; uint32_t projector_count = 0; uint32_t softshadow_count = 0; - RBSet decals; - RBSet reflection_probes; - RBSet voxel_gi_instances; - RBSet lightmap_captures; + HashSet decals; + HashSet reflection_probes; + HashSet voxel_gi_instances; + HashSet lightmap_captures; InstanceGeometryData() { can_cast_shadows = true; @@ -599,7 +599,7 @@ public: struct InstanceReflectionProbeData : public InstanceBaseData { Instance *owner = nullptr; - RBSet geometries; + HashSet geometries; RID instance; SelfList update_list; @@ -616,7 +616,7 @@ public: Instance *owner = nullptr; RID instance; - RBSet geometries; + HashSet geometries; InstanceDecalData() { } @@ -654,7 +654,7 @@ public: bool uses_projector = false; bool uses_softshadow = false; - RBSet geometries; + HashSet geometries; Instance *baked_light = nullptr; @@ -673,10 +673,10 @@ public: struct InstanceVoxelGIData : public InstanceBaseData { Instance *owner = nullptr; - RBSet geometries; - RBSet dynamic_geometries; + HashSet geometries; + HashSet dynamic_geometries; - RBSet lights; + HashSet lights; struct LightCache { RS::LightType type; @@ -713,8 +713,8 @@ public: struct InstanceLightmapData : public InstanceBaseData { RID instance; - RBSet geometries; - RBSet users; + HashSet geometries; + HashSet users; InstanceLightmapData() { } @@ -779,7 +779,7 @@ public: } }; - RBSet heightfield_particle_colliders_update_list; + HashSet heightfield_particle_colliders_update_list; PagedArrayPool instance_cull_page_pool; PagedArrayPool geometry_instance_cull_page_pool; -- cgit v1.2.3