#include <NvBlastFamilyGraph.h>
Classes | |
| struct | NodeComparator |
| struct | QueueElement |
| struct | TraversalState |
Public Member Functions | |
| bool | canFindRoot (NodeIndex startNode, NodeIndex targetNode, FixedArray< NodeIndex > *visitedNodes, const SupportGraph *graph) |
| FamilyGraph (const SupportGraph *graph) | |
| uint32_t | findIslands (ActorIndex actorIndex, void *scratch, const SupportGraph *graph) |
| uint32_t | getEdgesCount (const SupportGraph *graph) const |
| bool | hasEdge (NodeIndex node0, NodeIndex node1, const SupportGraph *graph) const |
| void | initialize (ActorIndex actorIndex, const SupportGraph *graph) |
| bool | notifyEdgeRemoved (ActorIndex actorIndex, NodeIndex node0, NodeIndex node1, uint32_t bondIndex, const SupportGraph *graph) |
| bool | notifyEdgeRemoved (ActorIndex actorIndex, NodeIndex node0, NodeIndex node1, const SupportGraph *graph) |
| bool | notifyNodeRemoved (ActorIndex actorIndex, NodeIndex nodeIndex, const SupportGraph *graph) |
| NvBlastBlockData (FixedBoolArray, m_isNodeInDirtyListOffset, getIsNodeInDirtyList) | |
| NvBlastBlockData (FixedBoolArray, m_isEdgeRemovedOffset, getIsEdgeRemoved) | |
| NvBlastBlockData (uint32_t, m_hopCountsOffset, getHopCounts) | |
| NvBlastBlockData (NodeIndex, m_fastRouteOffset, getFastRoute) | |
| NvBlastBlockData (uint32_t, m_firstDirtyNodeIndicesOffset, getFirstDirtyNodeIndices) | |
| NvBlastBlockData (NodeIndex, m_dirtyNodeLinksOffset, getDirtyNodeLinks) | |
| NvBlastBlockData (IslandId, m_islandIdsOffset, getIslandIds) | |
Static Public Member Functions | |
| static size_t | findIslandsRequiredScratch (uint32_t graphNodeCount) |
| static size_t | requiredMemorySize (uint32_t nodeCount, uint32_t bondCount) |
It processes full NvBlastSupportGraph graph, stores additional information used for faster islands finding, keeps and provides access to current islandId for every node.
| Nv::Blast::FamilyGraph::FamilyGraph | ( | const SupportGraph * | graph | ) |
Constructor. family graph is meant to be placed (with placement new) on family memory.
| [in] | graph | The graph to instance (see SupportGraph) |
| bool Nv::Blast::FamilyGraph::canFindRoot | ( | NodeIndex | startNode, | |
| NodeIndex | targetNode, | |||
| FixedArray< NodeIndex > * | visitedNodes, | |||
| const SupportGraph * | graph | |||
| ) |
| uint32_t Nv::Blast::FamilyGraph::findIslands | ( | ActorIndex | actorIndex, | |
| void * | scratch, | |||
| const SupportGraph * | graph | |||
| ) |
Function to find new islands by examining dirty nodes associated with this actor (they can be associated with actor if notifyEdgeRemoved() were previously called for it.
| [in] | actorIndex | The index of the actor on which graph part (edges + nodes) findIslands will be performed. Must be in the range [0, m_nodeCount). |
| [in] | scratch | User-supplied scratch memory of size findIslandsRequiredScratch(graphNodeCount) bytes. |
| [in] | graph | The static graph data for this family. |
| static size_t Nv::Blast::FamilyGraph::findIslandsRequiredScratch | ( | uint32_t | graphNodeCount | ) | [static] |
The scratch space required to call the findIslands function, in bytes.
| [in] | graphNodeCount | The number of nodes in the graph. |
| uint32_t Nv::Blast::FamilyGraph::getEdgesCount | ( | const SupportGraph * | graph | ) | const |
| bool Nv::Blast::FamilyGraph::hasEdge | ( | NodeIndex | node0, | |
| NodeIndex | node1, | |||
| const SupportGraph * | graph | |||
| ) | const |
| void Nv::Blast::FamilyGraph::initialize | ( | ActorIndex | actorIndex, | |
| const SupportGraph * | graph | |||
| ) |
Function to initialize graph (all nodes added to dirty list for this actor)
| [in] | actorIndex | The index of the actor to initialize graph with. Must be in the range [0, m_nodeCount). |
| [in] | graph | The static graph data for this family. |
| bool Nv::Blast::FamilyGraph::notifyEdgeRemoved | ( | ActorIndex | actorIndex, | |
| NodeIndex | node0, | |||
| NodeIndex | node1, | |||
| uint32_t | bondIndex, | |||
| const SupportGraph * | graph | |||
| ) |
| bool Nv::Blast::FamilyGraph::notifyEdgeRemoved | ( | ActorIndex | actorIndex, | |
| NodeIndex | node0, | |||
| NodeIndex | node1, | |||
| const SupportGraph * | graph | |||
| ) |
Function to notify graph about removed edges. These nodes will be added to dirty list for this actor. Returns true if bond as removed.
| [in] | actorIndex | The index of the actor from which the edge is removed. Must be in the range [0, m_nodeCount). |
| [in] | node0 | The index of the first node of removed edge. Must be in the range [0, m_nodeCount). |
| [in] | node1 | The index of the second node of removed edge. Must be in the range [0, m_nodeCount). |
| [in] | graph | The static graph data for this family. |
| bool Nv::Blast::FamilyGraph::notifyNodeRemoved | ( | ActorIndex | actorIndex, | |
| NodeIndex | nodeIndex, | |||
| const SupportGraph * | graph | |||
| ) |
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | FixedBoolArray | , | |
| m_isNodeInDirtyListOffset | , | |||
| getIsNodeInDirtyList | ||||
| ) |
Utility function to get the pointer of the is node in dirty list bitmap. This is an bitmap of size nodeCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | FixedBoolArray | , | |
| m_isEdgeRemovedOffset | , | |||
| getIsEdgeRemoved | ||||
| ) |
Utility function to get the pointer of the is edge removed bitmap. This is an bitmap of size bondCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | uint32_t | , | |
| m_hopCountsOffset | , | |||
| getHopCounts | ||||
| ) |
Utility function to get the start of the hop counts array. This is an array of size nodeCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | NodeIndex | , | |
| m_fastRouteOffset | , | |||
| getFastRoute | ||||
| ) |
Utility function to get the start of the fast route array. This is an array of size nodeCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | uint32_t | , | |
| m_firstDirtyNodeIndicesOffset | , | |||
| getFirstDirtyNodeIndices | ||||
| ) |
Utility function to get the start of the first dirty node indices array. This is an array of size nodeCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | NodeIndex | , | |
| m_dirtyNodeLinksOffset | , | |||
| getDirtyNodeLinks | ||||
| ) |
Utility function to get the start of the dirty node links array. This is an array of size nodeCount.
| Nv::Blast::FamilyGraph::NvBlastBlockData | ( | IslandId | , | |
| m_islandIdsOffset | , | |||
| getIslandIds | ||||
| ) |
Utility function to get the start of the island ids array. This is an array of size nodeCount. Every islandId == NodeIndex of root node in this island, it is set for every Node.
| static size_t Nv::Blast::FamilyGraph::requiredMemorySize | ( | uint32_t | nodeCount, | |
| uint32_t | bondCount | |||
| ) | [inline, static] |
Returns memory needed for this class (see fillMemory).
| [in] | nodeCount | The number of nodes in the graph. |
| [in] | bondCount | The number of bonds in the graph. |