From b350eb5f4d44e8448115796144375d79438d74ae Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Fri, 28 Apr 2017 14:19:07 +0200 Subject: NvCloth 1.1.0 Release. (22041545) --- NvCloth/src/SwFactory.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'NvCloth/src/SwFactory.cpp') diff --git a/NvCloth/src/SwFactory.cpp b/NvCloth/src/SwFactory.cpp index 418eb13..6f46c96 100644 --- a/NvCloth/src/SwFactory.cpp +++ b/NvCloth/src/SwFactory.cpp @@ -31,7 +31,6 @@ #include "SwFabric.h" #include "SwCloth.h" #include "SwSolver.h" -#include "ClothImpl.h" #include // for memcpy using namespace nv; @@ -66,7 +65,7 @@ cloth::Fabric* cloth::SwFactory::createFabric(uint32_t numParticles, Range particles, Fabric& fabric) { - return NV_CLOTH_NEW(SwClothImpl)(*this, fabric, particles); + return NV_CLOTH_NEW(SwCloth)(*this, static_cast(fabric), particles); } cloth::Solver* cloth::SwFactory::createSolver() @@ -80,7 +79,7 @@ cloth::Cloth* cloth::SwFactory::clone(const Cloth& cloth) return cloth.clone(*this); // forward to CuCloth // copy construct - return NV_CLOTH_NEW(SwClothImpl)(*this, static_cast(cloth)); + return NV_CLOTH_NEW(SwCloth)(*this, static_cast(cloth)); } void cloth::SwFactory::extractFabricData(const Fabric& fabric, Range phaseIndices, Range sets, @@ -157,7 +156,7 @@ void cloth::SwFactory::extractCollisionData(const Cloth& cloth, Range sp { NV_CLOTH_ASSERT(&cloth.getFactory() == this); - const SwCloth& swCloth = static_cast(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); NV_CLOTH_ASSERT(spheres.empty() || spheres.size() == swCloth.mStartCollisionSpheres.size()); NV_CLOTH_ASSERT(capsules.empty() || capsules.size() == swCloth.mCapsuleIndices.size() * 2); @@ -188,7 +187,7 @@ void cloth::SwFactory::extractMotionConstraints(const Cloth& cloth, Range(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); Vector::Type const& srcConstraints = !swCloth.mMotionConstraints.mTarget.empty() ? swCloth.mMotionConstraints.mTarget @@ -207,7 +206,7 @@ void cloth::SwFactory::extractSeparationConstraints(const Cloth& cloth, Range(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); Vector::Type const& srcConstraints = !swCloth.mSeparationConstraints.mTarget.empty() ? swCloth.mSeparationConstraints.mTarget @@ -226,7 +225,7 @@ void cloth::SwFactory::extractParticleAccelerations(const Cloth& cloth, Range(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); if (!swCloth.mParticleAccelerations.empty()) { @@ -242,7 +241,7 @@ void cloth::SwFactory::extractVirtualParticles(const Cloth& cloth, Range(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); uint32_t numIndices = cloth.getNumVirtualParticles(); uint32_t numWeights = cloth.getNumVirtualParticleWeights(); @@ -286,14 +285,14 @@ void cloth::SwFactory::extractVirtualParticles(const Cloth& cloth, Range destIndices) const { - const SwCloth& swCloth = static_cast(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); NV_CLOTH_ASSERT(destIndices.size() == swCloth.mSelfCollisionIndices.size()); memcpy(destIndices.begin(), swCloth.mSelfCollisionIndices.begin(), destIndices.size() * sizeof(uint32_t)); } void cloth::SwFactory::extractRestPositions(const Cloth& cloth, Range destRestPositions) const { - const SwCloth& swCloth = static_cast(cloth).mCloth; + const SwCloth& swCloth = static_cast(cloth); NV_CLOTH_ASSERT(destRestPositions.size() == swCloth.mRestPositions.size()); memcpy(destRestPositions.begin(), swCloth.mRestPositions.begin(), destRestPositions.size() * sizeof(PxVec4)); } -- cgit v1.2.3