From fabb251458f4a2d6d4f87dd36038fac2774b378c Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Fri, 20 Oct 2017 14:30:56 +0200 Subject: NvCloth 1.1.3 Release. (23014067) --- NvCloth/src/BoundingBox.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'NvCloth/src/BoundingBox.h') diff --git a/NvCloth/src/BoundingBox.h b/NvCloth/src/BoundingBox.h index 74bc0ff..ea84d52 100644 --- a/NvCloth/src/BoundingBox.h +++ b/NvCloth/src/BoundingBox.h @@ -37,26 +37,26 @@ namespace nv namespace cloth { -template +template struct BoundingBox { - Simd4f mLower; - Simd4f mUpper; + T4f mLower; + T4f mUpper; }; -template -inline BoundingBox loadBounds(const float* ptr) +template +inline BoundingBox loadBounds(const float* ptr) { - BoundingBox result; + BoundingBox result; result.mLower = load(ptr); result.mUpper = load(ptr + 3); return result; } -template -inline BoundingBox emptyBounds() +template +inline BoundingBox emptyBounds() { - BoundingBox result; + BoundingBox result; result.mLower = gSimd4fFloatMax; result.mUpper = -result.mLower; @@ -64,10 +64,10 @@ inline BoundingBox emptyBounds() return result; } -template -inline BoundingBox expandBounds(const BoundingBox& bounds, const Simd4f* pIt, const Simd4f* pEnd) +template +inline BoundingBox expandBounds(const BoundingBox& bounds, const T4f* pIt, const T4f* pEnd) { - BoundingBox result = bounds; + BoundingBox result = bounds; for (; pIt != pEnd; ++pIt) { result.mLower = min(result.mLower, *pIt); @@ -76,26 +76,26 @@ inline BoundingBox expandBounds(const BoundingBox& bounds, const return result; } -template -inline BoundingBox expandBounds(const BoundingBox& a, const BoundingBox& b) +template +inline BoundingBox expandBounds(const BoundingBox& a, const BoundingBox& b) { - BoundingBox result; + BoundingBox result; result.mLower = min(a.mLower, b.mLower); result.mUpper = max(a.mUpper, b.mUpper); return result; } -template -inline BoundingBox intersectBounds(const BoundingBox& a, const BoundingBox& b) +template +inline BoundingBox intersectBounds(const BoundingBox& a, const BoundingBox& b) { - BoundingBox result; + BoundingBox result; result.mLower = max(a.mLower, b.mLower); result.mUpper = min(a.mUpper, b.mUpper); return result; } -template -inline bool isEmptyBounds(const BoundingBox& a) +template +inline bool isEmptyBounds(const BoundingBox& a) { return anyGreater(a.mLower, a.mUpper) != 0; } -- cgit v1.2.3