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

Method geometry

src/resource/mesh_resource.cpp:63–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63const MeshGeometry *MeshResource::geometry(StringId32 name) const
64{
65 for (u32 i = 0; i < array::size(nodes); ++i) {
66 if (nodes[i].name == name)
67 return geometries[nodes[i].geometry_index];
68 }
69
70 if (array::size(geometries) > 0) {
71 char name_str[STRING_ID32_BUF_LEN];
72 logw(MESH_RESOURCE, "Mesh geometry not found: #ID(%s). Falling back...", name.to_string(name_str, sizeof(name_str)));
73 return geometries[0];
74 }
75
76 CE_FATAL("Mesh name not found");
77 return NULL;
78}
79
80namespace mesh_resource_internal
81{

Callers 2

create_instancesMethod · 0.80
set_geometryMethod · 0.80

Calls 2

to_stringMethod · 0.80
sizeFunction · 0.50

Tested by

no test coverage detected