MCPcopy Create free account
hub / github.com/crownengine/crown / update

Function update

src/world/render_world.cpp:144–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 static void update(CullingSet &set, CullableType::Enum type, u32 object_id, const Sphere &sphere, const Matrix4x4 &world)
145 {
146 u32 i;
147 u32 num_objects = array::size(set.id);
148 for (i = 0; i < num_objects; ++i) {
149 if (set.id[i] == object_id && set.type[i] == type)
150 break;
151 }
152 if (i == num_objects) {
153 // Not found, add it.
154 add(set, { world, sphere, object_id, type });
155 return;
156 }
157
158 Sphere sw;
159 sphere::transform(sw, sphere, world);
160 set.sphere_w[i] = sw;
161 }
162
163 static void cull_spheres(CullingSet &set, const Frustum &view_frustum, u32 offset, u32 count)
164 {

Callers 5

lod_group_set_obbMethod · 0.70
update_transformsMethod · 0.70
sync_cullable_setsMethod · 0.70
renderMethod · 0.70
reload_meshesMethod · 0.70

Calls 2

addFunction · 0.70
sizeFunction · 0.50

Tested by

no test coverage detected