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

Function find_object

src/world/render_world.cpp:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78namespace culling_set
79{
80 static u32 find_object(const CullingSet &set, CullableType::Enum type, u32 object_id)
81 {
82 u32 num_objects = array::size(set.id);
83
84 u32 i;
85 for (i = 0; i < num_objects; ++i) {
86 if (set.id[i] == object_id && set.type[i] == type)
87 break;
88 }
89
90 if (i == num_objects)
91 return UINT32_MAX;
92 return i;
93 }
94
95 static void add(CullingSet &set, const Cullable &object)
96 {

Callers 2

removeFunction · 0.85
sync_cullable_setsMethod · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected