MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / addEntity

Method addEntity

radiantcore/map/algorithm/MapImporter.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool MapImporter::addEntity(const scene::INodePtr& entityNode)
57{
58 // Keep track of this entity
59 _nodes.insert(NodeIndexMap::value_type(
60 NodeIndexPair(_entityCount, EMPTY_PRIMITVE_NUM), entityNode));
61
62 _entityCount++;
63
64 // Update the dialog text
65 _dlgEntityText = fmt::format(_("Loading entity {0:d}\n"), _entityCount);
66
67 if (_dialogEventLimiter.readyForEvent())
68 {
69 FileOperation msg(FileOperation::Type::Import, FileOperation::Progress, _fileSize > 0, getProgressFraction());
70 msg.setText(_dlgEntityText);
71 GlobalRadiantCore().getMessageBus().sendMessage(msg);
72 }
73
74 _root->addChildNode(entityNode);
75
76 return true;
77}
78
79bool MapImporter::addPrimitiveToEntity(const scene::INodePtr& primitive, const scene::INodePtr& entity)
80{

Callers 4

parseEntityMethod · 0.45
parseEntityMethod · 0.45
readEntityMethod · 0.45
attachToRenderSystemMethod · 0.45

Calls 8

value_typeClass · 0.85
readyForEventMethod · 0.80
sendMessageMethod · 0.80
addChildNodeMethod · 0.80
formatFunction · 0.50
_Function · 0.50
insertMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected