Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-18 16:04:10 -07:00
committed by Esteban Papp
parent 31467479ce
commit 7a929165c6
4 changed files with 16 additions and 16 deletions
@@ -112,7 +112,7 @@ namespace NvCloth
colliderConfig.get(),
static_cast<const Physics::SphereShapeConfiguration*>(shapeConfigPair.second.get()),
static_cast<int>(jointIndex),
sphereCount);
static_cast<int>(sphereCount));
sphereColliders.push_back(sphereCollider);
++sphereCount;
@@ -144,9 +144,9 @@ namespace NvCloth
colliderConfig.get(),
static_cast<const Physics::CapsuleShapeConfiguration*>(shapeConfigPair.second.get()),
static_cast<int>(jointIndex),
capsuleCount * 2, // Each capsule holds 2 sphere indices
sphereCount + 0, // First sphere index
sphereCount + 1); // Second sphere index
static_cast<int>(capsuleCount * 2), // Each capsule holds 2 sphere indices
static_cast<int>(sphereCount + 0), // First sphere index
static_cast<int>(sphereCount + 1)); // Second sphere index
capsuleColliders.push_back(capsuleCollider);
++capsuleCount;
@@ -481,13 +481,13 @@ namespace NvCloth
if (remappedIndex >= 0)
{
actorClothSkinning->m_simulatedVertices[remappedIndex] = vertexIndex;
actorClothSkinning->m_simulatedVertices[remappedIndex] = static_cast<AZ::u32>(vertexIndex);
}
if (remappedIndex < 0 ||
originalMeshParticles[vertexIndex].GetW() == 0.0f)
{
actorClothSkinning->m_nonSimulatedVertices.emplace_back(vertexIndex);
actorClothSkinning->m_nonSimulatedVertices.emplace_back(static_cast<AZ::u32>(vertexIndex));
}
}
actorClothSkinning->m_nonSimulatedVertices.shrink_to_fit();
@@ -556,7 +556,7 @@ namespace NvCloth
for (size_t index = 0; index < numVertices; ++index)
{
const int renderVertexIndex = firstVertex + index;
const int renderVertexIndex = static_cast<int>(firstVertex + index);
const SimParticleFormat& renderParticle = renderParticles[renderVertexIndex];
destVerticesBuffer[index].Set(
+9 -9
View File
@@ -145,7 +145,7 @@ namespace UnitTest
}};
nv::cloth::Vector<physx::PxVec4>::Type nvEmpty;
nv::cloth::Vector<physx::PxVec4>::Type nvValues(azValues.size());
nv::cloth::Vector<physx::PxVec4>::Type nvValues(static_cast<uint32_t>(azValues.size()));
nv::cloth::Range<physx::PxVec4> nvEmptyRange(nvEmpty.begin(), nvEmpty.end());
nv::cloth::Range<physx::PxVec4> nvValuesRange(nvValues.begin(), nvValues.end());
@@ -192,7 +192,7 @@ namespace UnitTest
}};
nv::cloth::Vector<physx::PxVec4>::Type nvEmpty;
nv::cloth::Vector<physx::PxVec4>::Type nvValues(azValues.size());
nv::cloth::Vector<physx::PxVec4>::Type nvValues(static_cast<uint32_t>(azValues.size()));
nv::cloth::Range<physx::PxVec4> nvEmptyRange(nvEmpty.begin(), nvEmpty.end());
nv::cloth::Range<physx::PxVec4> nvValuesRange(nvValues.begin(), nvValues.end());
@@ -336,7 +336,7 @@ namespace UnitTest
const nv::cloth::MappedRange<const physx::PxVec4> nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth);
for (size_t i = 0; i < newParticles.size(); ++i)
{
EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[i].w, Tolerance);
EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[static_cast<uint32_t>(i)].w, Tolerance);
}
}
@@ -364,7 +364,7 @@ namespace UnitTest
const nv::cloth::MappedRange<const physx::PxVec4> nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth);
for (size_t i = 0; i < newParticles.size(); ++i)
{
EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[i].w, Tolerance);
EXPECT_NEAR(newParticles[i].GetW(), nvClothPreviousParticles[static_cast<uint32_t>(i)].w, Tolerance);
}
}
@@ -378,7 +378,7 @@ namespace UnitTest
EXPECT_EQ(nvClothCurrentParticles.size(), nvClothPreviousParticles.size());
for (size_t i = 0; i < nvClothCurrentParticles.size(); ++i)
{
ExpectEq(nvClothCurrentParticles[i], nvClothPreviousParticles[i]);
ExpectEq(nvClothCurrentParticles[static_cast<uint32_t>(i)], nvClothPreviousParticles[static_cast<uint32_t>(i)]);
}
}
@@ -468,7 +468,7 @@ namespace UnitTest
EXPECT_EQ(nvClothCurrentParticles.size(), nvClothPreviousParticles.size());
for (size_t i = 0; i < nvClothCurrentParticles.size(); ++i)
{
ExpectEq(nvClothCurrentParticles[i], nvClothPreviousParticles[i]);
ExpectEq(nvClothCurrentParticles[static_cast<uint32_t>(i)], nvClothPreviousParticles[static_cast<uint32_t>(i)]);
}
}
@@ -504,8 +504,8 @@ namespace UnitTest
EXPECT_EQ(initialParticles.size(), nvClothPreviousParticles.size());
for (size_t i = 0; i < initialParticles.size(); ++i)
{
ExpectEq(initialParticles[i], nvClothCurrentParticles[i]);
ExpectEq(initialParticles[i], nvClothPreviousParticles[i]);
ExpectEq(initialParticles[i], nvClothCurrentParticles[static_cast<uint32_t>(i)]);
ExpectEq(initialParticles[i], nvClothPreviousParticles[static_cast<uint32_t>(i)]);
}
}
@@ -614,7 +614,7 @@ namespace UnitTest
const nv::cloth::MappedRange<const physx::PxVec4> nvClothPreviousParticles = nv::cloth::readPreviousParticles(*m_nvCloth);
for (size_t i = 0; i < initialParticles.size(); ++i)
{
EXPECT_NEAR(nvClothPreviousParticles[i].w, initialParticles[i].GetW() / globalMass, Tolerance);
EXPECT_NEAR(nvClothPreviousParticles[static_cast<uint32_t>(i)].w, initialParticles[i].GetW() / globalMass, Tolerance);
}
}
} // namespace UnitTest