aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/extensions
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2019-04-29 16:21:42 +0200
committerMarijn Tamis <[email protected]>2019-04-29 16:21:42 +0200
commit90963f4c0a38c705fe85101f2be5fdd09911b10f (patch)
tree34ca6c9e642ce4998612e3ee5bf3264a57c21277 /NvCloth/extensions
parent1.1.6 Release. (diff)
downloadnvcloth-90963f4c0a38c705fe85101f2be5fdd09911b10f.tar.xz
nvcloth-90963f4c0a38c705fe85101f2be5fdd09911b10f.zip
Fix potential namespace issues when using NvCloth together with PhysX.
Diffstat (limited to 'NvCloth/extensions')
-rw-r--r--NvCloth/extensions/src/ClothFabricCooker.cpp18
-rw-r--r--NvCloth/extensions/src/ClothGeodesicTetherCooker.cpp12
-rw-r--r--NvCloth/extensions/src/ClothMeshQuadifier.cpp8
3 files changed, 19 insertions, 19 deletions
diff --git a/NvCloth/extensions/src/ClothFabricCooker.cpp b/NvCloth/extensions/src/ClothFabricCooker.cpp
index eda73de..c10098f 100644
--- a/NvCloth/extensions/src/ClothFabricCooker.cpp
+++ b/NvCloth/extensions/src/ClothFabricCooker.cpp
@@ -208,13 +208,13 @@ namespace
mBending += PxMax(0.0f, 0.1f - ratio) * 3;
}
- PxReal mStretching;
- PxReal mBending;
- PxReal mShearing;
+ physx::PxReal mStretching;
+ physx::PxReal mBending;
+ physx::PxReal mShearing;
};
- typedef shdfnd::Pair<PxU32, PxU32> Pair;
- typedef shdfnd::Pair<Pair, ClothFabricPhaseType::Enum> Entry;
+ typedef ps::Pair<PxU32, physx::PxU32> Pair;
+ typedef ps::Pair<Pair, ClothFabricPhaseType::Enum> Entry;
// maintain heap status after elements have been pushed (heapify)
template<typename T>
@@ -234,7 +234,7 @@ namespace
if (!(begin[parent] < begin[current]))
break;
- shdfnd::swap(begin[parent], begin[current]);
+ ps::swap(begin[parent], begin[current]);
current = parent;
}
}
@@ -246,7 +246,7 @@ namespace
T* begin = heap.begin();
T* end = heap.end();
- shdfnd::swap(begin[0], end[-1]); // exchange elements
+ ps::swap(begin[0], end[-1]); // exchange elements
// shift down
end--;
@@ -261,7 +261,7 @@ namespace
if (!(begin[current] < begin[child]))
break;
- shdfnd::swap(begin[current], begin[child]);
+ ps::swap(begin[current], begin[child]);
current = child;
}
@@ -546,7 +546,7 @@ bool FabricCookerImpl::cook(const ClothMeshDesc& desc, PxVec3 gravity, bool useG
const PxU32 restOffset = mSets[i];
ConstraintSorter predicate(&mIndices[indicesOffset]);
- shdfnd::sort(&reorder[0], reorder.size(), predicate, nv::cloth::NonTrackingAllocator());
+ ps::sort(&reorder[0], reorder.size(), predicate, nv::cloth::ps::NonTrackingAllocator());
for (PxU32 r=0; r < reorder.size(); ++r)
{
diff --git a/NvCloth/extensions/src/ClothGeodesicTetherCooker.cpp b/NvCloth/extensions/src/ClothGeodesicTetherCooker.cpp
index 7557389..983490b 100644
--- a/NvCloth/extensions/src/ClothGeodesicTetherCooker.cpp
+++ b/NvCloth/extensions/src/ClothGeodesicTetherCooker.cpp
@@ -146,7 +146,7 @@ namespace
if (!(begin[parent] < begin[current]))
break;
- shdfnd::swap(begin[parent], begin[current]);
+ ps::swap(begin[parent], begin[current]);
current = parent;
}
}
@@ -158,7 +158,7 @@ namespace
T* begin = heap.begin();
T* end = heap.end();
- shdfnd::swap(begin[0], end[-1]); // exchange elements
+ ps::swap(begin[0], end[-1]); // exchange elements
// shift down
end--;
@@ -173,7 +173,7 @@ namespace
if (!(begin[current] < begin[child]))
break;
- shdfnd::swap(begin[current], begin[child]);
+ ps::swap(begin[current], begin[child]);
current = child;
}
@@ -237,7 +237,7 @@ namespace
: mFromVertIndex(v0), mToVertIndex(v1), mHalfEdgeIndex(halfEdgeIndex)
{
if(mFromVertIndex > mToVertIndex)
- shdfnd::swap(mFromVertIndex, mToVertIndex);
+ ps::swap(mFromVertIndex, mToVertIndex);
}
bool operator<(const MeshEdge& e) const
@@ -635,7 +635,7 @@ PxU32 ClothGeodesicTetherCooker::findTriNeighbors()
edges.pushBack(MeshEdge(int(i2), int(i0), int(3*i+2)));
}
- shdfnd::sort(edges.begin(), edges.size(), shdfnd::Less<MeshEdge>(), NonTrackingAllocator());
+ ps::sort(edges.begin(), edges.size(), ps::Less<MeshEdge>(), ps::NonTrackingAllocator());
int numEdges = int(edges.size());
for(int i=0; i < numEdges; )
@@ -680,7 +680,7 @@ void ClothGeodesicTetherCooker::findVertTriNeighbors()
vertTriangles.pushBack(VertTriangle(int(mIndices[PxU32(3*i+2)]), i));
}
- shdfnd::sort(vertTriangles.begin(), vertTriangles.size(), shdfnd::Less<VertTriangle>(), NonTrackingAllocator());
+ ps::sort(vertTriangles.begin(), vertTriangles.size(), ps::Less<VertTriangle>(), ps::NonTrackingAllocator());
mFirstVertTriAdj.resize(mNumParticles);
mVertTriAdjs.reserve(mIndices.size());
diff --git a/NvCloth/extensions/src/ClothMeshQuadifier.cpp b/NvCloth/extensions/src/ClothMeshQuadifier.cpp
index 2250c09..511fa06 100644
--- a/NvCloth/extensions/src/ClothMeshQuadifier.cpp
+++ b/NvCloth/extensions/src/ClothMeshQuadifier.cpp
@@ -133,7 +133,7 @@ namespace
PxU32 indexMap[3][3] = { { 0, 1, 2 }, { 1, 2, 0 }, { 0, 2, 1 } };
- const PxF32 rightAngle = PxCos(shdfnd::degToRad(85.0f));
+ const PxF32 rightAngle = PxCos(ps::degToRad(85.0f));
for(PxU32 i=0; i<triangles.size(); i+=3)
{
@@ -166,7 +166,7 @@ namespace
uniqueEdges.pushBack(edges[j]);
}
- shdfnd::sort(uniqueEdges.begin(), uniqueEdges.size(), UniqueEdge(0, 0, 0), NonTrackingAllocator());
+ ps::sort(uniqueEdges.begin(), uniqueEdges.size(), UniqueEdge(0, 0, 0), ps::NonTrackingAllocator());
PxU32 writeIndex = 0, readStart = 0, readEnd = 0;
PxU32 numQuadEdges = 0;
@@ -259,9 +259,9 @@ namespace
}
}
- shdfnd::sort(hideEdges.begin(), hideEdges.size(), SortHiddenEdges(uniqueEdges), NonTrackingAllocator());
+ ps::sort(hideEdges.begin(), hideEdges.size(), SortHiddenEdges(uniqueEdges), ps::NonTrackingAllocator());
- const PxF32 maxAngle = PxSin(shdfnd::degToRad(60.0f));
+ const PxF32 maxAngle = PxSin(ps::degToRad(60.0f));
PxU32 numHiddenEdges = 0;