| 201 | } |
| 202 | |
| 203 | bool FamilyGraph::notifyNodeRemoved(ActorIndex actorIndex, NodeIndex nodeIndex, const SupportGraph* graph) |
| 204 | { |
| 205 | NVBLAST_ASSERT(nodeIndex < graph->m_nodeCount); |
| 206 | |
| 207 | // used internal data pointers |
| 208 | NodeIndex* fastRoute = getFastRoute(); |
| 209 | const uint32_t* adjacencyPartition = graph->getAdjacencyPartition(); |
| 210 | const uint32_t* adjacentBondIndices = graph->getAdjacentBondIndices(); |
| 211 | |
| 212 | // remove all edges leaving this node |
| 213 | for (uint32_t adjacencyIndex = adjacencyPartition[nodeIndex]; adjacencyIndex < adjacencyPartition[nodeIndex + 1]; adjacencyIndex++) |
| 214 | { |
| 215 | const uint32_t adjacentNodeIndex = getAdjacentNode(adjacencyIndex, graph); |
| 216 | if (!isInvalidIndex(adjacentNodeIndex)) |
| 217 | { |
| 218 | const uint32_t bondIndex = adjacentBondIndices[adjacencyIndex]; |
| 219 | getIsEdgeRemoved()->set(bondIndex); |
| 220 | |
| 221 | if (fastRoute[adjacentNodeIndex] == nodeIndex) |
| 222 | fastRoute[adjacentNodeIndex] = invalidIndex<uint32_t>(); |
| 223 | if (fastRoute[nodeIndex] == adjacentNodeIndex) |
| 224 | fastRoute[nodeIndex] = invalidIndex<uint32_t>(); |
| 225 | |
| 226 | addToDirtyNodeList(actorIndex, adjacentNodeIndex); |
| 227 | } |
| 228 | } |
| 229 | addToDirtyNodeList(actorIndex, nodeIndex); |
| 230 | |
| 231 | // ignore this node in partition (only needed for "chunk deleted from graph") |
| 232 | // getIslandIds()[nodeIndex] = invalidIndex<uint32_t>(); |
| 233 | |
| 234 | return true; |
| 235 | } |
| 236 | |
| 237 | void FamilyGraph::unwindRoute(uint32_t traversalIndex, NodeIndex lastNode, uint32_t hopCount, IslandId id, FixedArray<TraversalState>* visitedNodes) |
| 238 | { |
no test coverage detected