aboutsummaryrefslogtreecommitdiff
path: root/test/src/TkBaseTest.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-10-24 15:25:02 -0700
committerBryan Galdrikian <[email protected]>2017-10-24 15:25:02 -0700
commitb0c11962f6012430da3bcaa2727288046b33d648 (patch)
treecf13338fa4fd7072badf64f751f94abeeb437003 /test/src/TkBaseTest.h
parentlinux build fix - all configs (diff)
downloadblast-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.h31
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;