29 #ifndef NVBLASTFAMILYGRAPH_H 30 #define NVBLASTFAMILYGRAPH_H 82 return fillMemory(
nullptr, nodeCount, bondCount);
149 NvBlastBlockData(uint32_t, m_firstDirtyNodeIndicesOffset, getFirstDirtyNodeIndices);
188 struct TraversalState
190 NodeIndex mNodeIndex;
191 uint32_t mCurrentIndex;
199 TraversalState(NodeIndex nodeIndex, uint32_t currentIndex, uint32_t prevIndex, uint32_t depth) :
200 mNodeIndex(nodeIndex), mCurrentIndex(currentIndex), mPrevIndex(prevIndex), mDepth(depth)
210 TraversalState* mState;
217 QueueElement(TraversalState* state, uint32_t hopCount) : mState(state), mHopCount(hopCount)
225 struct NodeComparator
231 bool operator() (
const QueueElement& node0,
const QueueElement& node1)
const 233 return node0.mHopCount < node1.mHopCount;
236 NodeComparator& operator = (
const NodeComparator&);
257 static size_t fillMemory(
FamilyGraph* familyGraph, uint32_t nodeCount, uint32_t bondCount);
274 void unwindRoute(uint32_t traversalIndex, NodeIndex lastNode, uint32_t hopCount, IslandId
id,
FixedArray<TraversalState>* visitedNodes);
279 void addToDirtyNodeList(ActorIndex actorIndex, NodeIndex node);
284 NodeIndex getAdjacentNode(uint32_t adjacencyIndex,
const SupportGraph* graph)
const 286 const uint32_t bondIndex = graph->getAdjacentBondIndices()[adjacencyIndex];
287 return getIsEdgeRemoved()->test(bondIndex) ? invalidIndex<uint32_t>() : graph->getAdjacentNodeIndices()[adjacencyIndex];
297 #endif // ifndef NVBLASTFAMILYGRAPH_H bool notifyEdgeRemoved(ActorIndex actorIndex, NodeIndex node0, NodeIndex node1, const SupportGraph *graph)
Definition: NvBlastFixedBoolArray.h:63
Definition: NvBlastFamilyGraph.h:58
uint32_t findIslands(ActorIndex actorIndex, void *scratch, const SupportGraph *graph)
Definition: NvBlastSupportGraph.h:76
static size_t findIslandsRequiredScratch(uint32_t graphNodeCount)
Definition: NvBlastFixedPriorityQueue.h:73
NvBlastBlockData(IslandId, m_islandIdsOffset, getIslandIds)
Definition: NvBlastFixedArray.h:64
uint32_t getEdgesCount(const SupportGraph *graph) const
FamilyGraph(const SupportGraph *graph)
uint32_t NodeIndex
Definition: NvBlastFamilyGraph.h:48
void initialize(ActorIndex actorIndex, const SupportGraph *graph)
Definition: NvBlastFixedBitmap.h:63
bool notifyNodeRemoved(ActorIndex actorIndex, NodeIndex nodeIndex, const SupportGraph *graph)
NodeIndex IslandId
Definition: NvBlastFamilyGraph.h:49
bool hasEdge(NodeIndex node0, NodeIndex node1, const SupportGraph *graph) const
static size_t requiredMemorySize(uint32_t nodeCount, uint32_t bondCount)
Definition: NvBlastFamilyGraph.h:80
Definition: NvBlastArray.h:37
uint32_t ActorIndex
Definition: NvBlastFamilyGraph.h:50
bool canFindRoot(NodeIndex startNode, NodeIndex targetNode, FixedArray< NodeIndex > *visitedNodes, const SupportGraph *graph)