aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/scene
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2019-04-01 14:21:09 +0200
committerMarijn Tamis <[email protected]>2019-04-01 14:21:09 +0200
commitd243404d4ba88bcf53f7310cc8980b4efe38c19f (patch)
treedcc8ce2904e9f813e03f71f825c4d3c9ec565d91 /NvCloth/samples/SampleBase/scene
parentAdd new SetSpheres and SetPlanes api's to bring them in line with setTriangles. (diff)
downloadnvcloth-1.1.6.tar.xz
nvcloth-1.1.6.zip
1.1.6 Release.1.1.6
Diffstat (limited to 'NvCloth/samples/SampleBase/scene')
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
index 8a677f1..7ab5ca0 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
@@ -83,7 +83,7 @@ void PlaneCollisionScene::initializeCloth(int index, physx::PxVec3 offset)
//assign as collision data
nv::cloth::Range<const physx::PxVec4> planesR(&planes[0], &planes[0] + planes.size());
- mClothActor[index]->mCloth->setPlanes(planesR, 0, mClothActor[index]->mCloth->getNumPlanes());
+ mClothActor[index]->mCloth->setPlanes(planesR, planesR);
//assign convex indices
std::vector<uint32_t> indices;
diff --git a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
index 2e6912e..8bb004e 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
@@ -84,7 +84,9 @@ void SphereScene::initializeCloth(int index, physx::PxVec3 offset)
physx::PxVec4 spheres[1] = {physx::PxVec4(physx::PxVec3(0.f, 10.f, -1.f) + offset,1.5)};
- mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), 0, mClothActor[index]->mCloth->getNumSpheres());
+ //mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), 0, mClothActor[index]->mCloth->getNumSpheres());
+ mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1));
+
// Setup phase configs
std::vector<nv::cloth::PhaseConfig> phases(mFabric[index]->getNumPhases());