MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / addObject

Method addObject

Source/Main/scenegraph.cpp:280–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280bool SceneGraph::addObject(Object* new_object) {
281 LinkObject(new_object);
282 new_object->scenegraph_ = this;
283 if (new_object->Initialize() == false) {
284 LOGE << "Failed at initializing object on addObject in scenegraph, unlinking. Type: " << CStringFromEntityType(new_object->GetType()) << " name: " << new_object->GetName() << std::endl;
285 UnlinkObject(new_object);
286 return false;
287 }
288 new_object->GetShaderNames(preload_shaders);
289 return true;
290}
291
292void SceneGraph::LinkObject(Object* new_object) {
293 for (auto& i : destruction_sanity) {

Callers 5

LoadTerrainFunction · 0.80
AddCameraFunction · 0.80
DrawMethod · 0.80
PreviewTerrainMethod · 0.80
ActorsEditor_AddEntityFunction · 0.80

Calls 5

CStringFromEntityTypeFunction · 0.85
InitializeMethod · 0.45
GetTypeMethod · 0.45
GetNameMethod · 0.45
GetShaderNamesMethod · 0.45

Tested by

no test coverage detected