diff options
| author | Bryan Galdrikian <[email protected]> | 2017-10-24 15:25:02 -0700 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2017-10-24 15:25:02 -0700 |
| commit | b0c11962f6012430da3bcaa2727288046b33d648 (patch) | |
| tree | cf13338fa4fd7072badf64f751f94abeeb437003 /test/src/TkBaseTest.h | |
| parent | linux build fix - all configs (diff) | |
| download | blast-b0c11962f6012430da3bcaa2727288046b33d648.tar.xz blast-b0c11962f6012430da3bcaa2727288046b33d648.zip | |
Changes for 1.1.1
See README.md
Diffstat (limited to 'test/src/TkBaseTest.h')
| -rw-r--r-- | test/src/TkBaseTest.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/test/src/TkBaseTest.h b/test/src/TkBaseTest.h index 2980601..7106647 100644 --- a/test/src/TkBaseTest.h +++ b/test/src/TkBaseTest.h @@ -167,34 +167,31 @@ struct CSParams float coord; }; -static void CubeSlicer(NvBlastFractureBuffers* outbuf, const NvBlastGraphShaderActor* actor, const NvBlastProgramParams* params) +static void CubeSlicer(NvBlastFractureBuffers* outbuf, const NvBlastGraphShaderActor* actor, const void* params) { uint32_t bondFractureCount = 0; uint32_t bondFractureCountMax = outbuf->bondFractureCount; - for (size_t i = 0; i < params->damageDescCount; ++i) - { - const CSParams& p = (reinterpret_cast<const CSParams*> (params->damageDescBuffer))[i]; + const CSParams& p = *reinterpret_cast<const CSParams*> (reinterpret_cast<const NvBlastExtProgramParams*>(params)->damageDesc); - uint32_t currentNodeIndex = actor->firstGraphNodeIndex; - while (!Nv::Blast::isInvalidIndex(currentNodeIndex)) + uint32_t currentNodeIndex = actor->firstGraphNodeIndex; + while (!Nv::Blast::isInvalidIndex(currentNodeIndex)) + { + for (uint32_t adj = actor->adjacencyPartition[currentNodeIndex]; adj < actor->adjacencyPartition[currentNodeIndex + 1]; ++adj) { - for (uint32_t adj = actor->adjacencyPartition[currentNodeIndex]; adj < actor->adjacencyPartition[currentNodeIndex + 1]; ++adj) + if (currentNodeIndex < actor->adjacentNodeIndices[adj]) { - if (currentNodeIndex < actor->adjacentNodeIndices[adj]) + if (actor->assetBonds[actor->adjacentBondIndices[adj]].centroid[p.axis] == p.coord && bondFractureCount < bondFractureCountMax) { - if (actor->assetBonds[actor->adjacentBondIndices[adj]].centroid[p.axis] == p.coord && bondFractureCount < bondFractureCountMax) - { - NvBlastBondFractureData& data = outbuf->bondFractures[bondFractureCount++]; - data.userdata = 0; - data.nodeIndex0 = currentNodeIndex; - data.nodeIndex1 = actor->adjacentNodeIndices[adj]; - data.health = 1.0f; - } + NvBlastBondFractureData& data = outbuf->bondFractures[bondFractureCount++]; + data.userdata = 0; + data.nodeIndex0 = currentNodeIndex; + data.nodeIndex1 = actor->adjacentNodeIndices[adj]; + data.health = 1.0f; } } - currentNodeIndex = actor->graphNodeIndexLinks[currentNodeIndex]; } + currentNodeIndex = actor->graphNodeIndexLinks[currentNodeIndex]; } outbuf->bondFractureCount = bondFractureCount; |