From ca32c59a58d37c1822e185a2d5f3d0d3e8943593 Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Thu, 3 May 2018 18:22:48 +0200 Subject: NvCloth 1.1.4 Release. (24070740) --- NvCloth/src/SwCloth.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'NvCloth/src/SwCloth.cpp') diff --git a/NvCloth/src/SwCloth.cpp b/NvCloth/src/SwCloth.cpp index 6077ada..46a7784 100644 --- a/NvCloth/src/SwCloth.cpp +++ b/NvCloth/src/SwCloth.cpp @@ -269,28 +269,13 @@ void SwCloth::setVirtualParticles(Range indices, Range::Type::ConstIterator sIt = scheduler.mSetSizes.begin(); - Vector::Type::ConstIterator sEnd = scheduler.mSetSizes.end(); - TripletScheduler::ConstTripletIter tIt = scheduler.mTriplets.begin(), tLast; - mVirtualParticleIndices.resize(0); - mVirtualParticleIndices.reserve(indices.size() + 3 * uint32_t(sEnd - sIt)); - for (; sIt != sEnd; ++sIt) - { - uint32_t setSize = *sIt; - for (tLast = tIt + setSize; tIt != tLast; ++tIt, ++mNumVirtualParticles) - mVirtualParticleIndices.pushBack(Vec4us(*tIt)); - mVirtualParticleIndices.resize((mVirtualParticleIndices.size() + 3) & ~3, dummy); - } - Vector::Type(mVirtualParticleIndices.begin(), mVirtualParticleIndices.end()) - .swap(mVirtualParticleIndices); + mVirtualParticleIndices.swap(scheduler.mPaddedTriplets); // precompute 1/dot(w,w) - Vector::Type().swap(mVirtualParticleWeights); + Vector::Type().swap(mVirtualParticleWeights); //clear and trim mVirtualParticleWeights.reserve(weights.size()); for (; !weights.empty(); weights.popFront()) { -- cgit v1.2.3