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

Method onInsertIntoScene

radiantcore/patch/PatchNode.cpp:305–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305void PatchNode::onInsertIntoScene(scene::IMapRootNode& root)
306{
307 // Mark the GL shader as used from now on, this is used by the TextureBrowser's filtering
308 m_patch.getSurfaceShader().setInUse(true);
309
310 // When inserting a patch into the scene, it gets a parent entity assigned
311 // The colour of that entity will influence the tesselation's vertex colours
312 m_patch.queueTesselationUpdate();
313
314 updateAllRenderables();
315
316 m_patch.connectUndoSystem(root.getUndoSystem());
317 GlobalCounters().getCounter(counterPatches).increment();
318
319 // Update the origin information needed for transformations
320 _untransformedOrigin = worldAABB().getOrigin();
321
322 SelectableNode::onInsertIntoScene(root);
323}
324
325void PatchNode::onRemoveFromScene(scene::IMapRootNode& root)
326{

Callers

nothing calls this directly

Calls 4

setInUseMethod · 0.80
connectUndoSystemMethod · 0.45
incrementMethod · 0.45

Tested by

no test coverage detected