diff options
| author | Marijn Tamis <[email protected]> | 2018-05-03 18:22:48 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2018-05-03 18:22:48 +0200 |
| commit | ca32c59a58d37c1822e185a2d5f3d0d3e8943593 (patch) | |
| tree | b06b9eec03f34344ef8fc31aa147b2714d3962ee /NvCloth/src/cuda/CuCollision.h | |
| parent | Forced rename of platform folders in cmake dir. Git didn't pick this up before. (diff) | |
| download | nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.tar.xz nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.zip | |
NvCloth 1.1.4 Release. (24070740)
Diffstat (limited to 'NvCloth/src/cuda/CuCollision.h')
| -rw-r--r-- | NvCloth/src/cuda/CuCollision.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/NvCloth/src/cuda/CuCollision.h b/NvCloth/src/cuda/CuCollision.h index aeb2bda..f9b69f7 100644 --- a/NvCloth/src/cuda/CuCollision.h +++ b/NvCloth/src/cuda/CuCollision.h @@ -1160,9 +1160,10 @@ __device__ void apply(ParticleDataT& particleData, const int4& indices, const fl posX.y += delta.y * weights.x; posY.y += delta.y * weights.y; posZ.y += delta.y * weights.z; posX.z += delta.z * weights.x; posY.z += delta.z * weights.y; posZ.z += delta.z * weights.z; - particleData(indices.x) = posX; - particleData(indices.y) = posY; - particleData(indices.z) = posZ; + //if(particle is not static) store new position + if(particleData(indices.x,3)!= 0) particleData(indices.x) = posX; + if(particleData(indices.y,3)!= 0) particleData(indices.y) = posY; + if(particleData(indices.z,3)!= 0) particleData(indices.z) = posZ; } #else template <typename PointerT> |