| 26 | NodeRefArray NodeManager::_sortedNodes; |
| 27 | |
| 28 | void NodeManager::init() |
| 29 | { |
| 30 | _INTR_LOG_INFO("Inititializing Node Component Manager..."); |
| 31 | |
| 32 | Dod::Components::ComponentManagerBase< |
| 33 | NodeData, _INTR_MAX_NODE_COMPONENT_COUNT>::_initComponentManager(); |
| 34 | |
| 35 | _sortedNodes.reserve(_INTR_MAX_NODE_COMPONENT_COUNT); |
| 36 | _rootNodes.reserve(_INTR_MAX_NODE_COMPONENT_COUNT); |
| 37 | |
| 38 | Dod::Components::ComponentManagerEntry nodeEntry; |
| 39 | { |
| 40 | nodeEntry.createFunction = Components::NodeManager::createNode; |
| 41 | nodeEntry.destroyFunction = Components::NodeManager::destroyNode; |
| 42 | nodeEntry.getComponentForEntityFunction = |
| 43 | Components::NodeManager::getComponentForEntity; |
| 44 | nodeEntry.onPropertyUpdateFinishedFunction = |
| 45 | Components::NodeManager::updateTransforms; |
| 46 | nodeEntry.onInsertionDeletionFinishedAction = |
| 47 | Components::NodeManager::rebuildTreeAndUpdateTransforms; |
| 48 | |
| 49 | Application::_componentManagerMapping[_N(Node)] = nodeEntry; |
| 50 | Application::_orderedComponentManagers.push_back(nodeEntry); |
| 51 | } |
| 52 | |
| 53 | Dod::PropertyCompilerEntry propCompilerNode; |
| 54 | { |
| 55 | propCompilerNode.compileFunction = |
| 56 | Components::NodeManager::compileDescriptor; |
| 57 | propCompilerNode.initFunction = Components::NodeManager::initFromDescriptor; |
| 58 | propCompilerNode.ref = Dod::Ref(); |
| 59 | |
| 60 | Application::_componentPropertyCompilerMapping[_N(Node)] = propCompilerNode; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void NodeManager::updateTransforms(const NodeRefArray& p_Nodes) |
| 65 | { |