Graph initialization, reset all internal data to initial state. Marks all nodes dirty for this actor. First island search probably would be the longest one, as it has to traverse whole graph and set all the optimization stuff like fastRoute and hopCounts for all nodes. */
| 99 | First island search probably would be the longest one, as it has to traverse whole graph and set all the optimization stuff like fastRoute and hopCounts for all nodes. |
| 100 | */ |
| 101 | void FamilyGraph::initialize(ActorIndex actorIndex, const SupportGraph* graph) |
| 102 | { |
| 103 | // used internal data pointers |
| 104 | NodeIndex* dirtyNodeLinks = getDirtyNodeLinks(); |
| 105 | uint32_t* firstDirtyNodeIndices = getFirstDirtyNodeIndices(); |
| 106 | |
| 107 | // link dirty nodes |
| 108 | for (NodeIndex node = 1; node < graph->m_nodeCount; node++) |
| 109 | { |
| 110 | dirtyNodeLinks[node-1] = node; |
| 111 | } |
| 112 | firstDirtyNodeIndices[actorIndex] = 0; |
| 113 | |
| 114 | getIsNodeInDirtyList()->fill(); |
| 115 | getIsEdgeRemoved()->clear(); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | void FamilyGraph::addToDirtyNodeList(ActorIndex actorIndex, NodeIndex node) |