mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
swap->btSwap
This commit is contained in:
parent
665c04fbed
commit
d72b8b50a0
@ -536,14 +536,6 @@ static SIMD_FORCE_INLINE bool bernsteinVFTest(const btSoftBody::Face* face, cons
|
||||
return coplanarAndInsideTest(k0, k1, k2, k3, face, node, dt);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static SIMD_FORCE_INLINE void swap(T& a, T& b)
|
||||
{
|
||||
T temp = a;
|
||||
a = b;
|
||||
b = temp;
|
||||
}
|
||||
|
||||
static SIMD_FORCE_INLINE bool continuousCollisionDetection(const btSoftBody::Face* face, const btSoftBody::Node* node, const btScalar& dt, const btScalar& mrg, btVector3& bary)
|
||||
{
|
||||
if (hasSeparatingPlane(face, node, dt))
|
||||
@ -599,14 +591,14 @@ static SIMD_FORCE_INLINE bool continuousCollisionDetection(const btSoftBody::Fac
|
||||
if (num_roots > 1)
|
||||
{
|
||||
if (roots[0] > roots[1])
|
||||
swap(roots[0], roots[1]);
|
||||
btSwap(roots[0], roots[1]);
|
||||
}
|
||||
if (num_roots > 2)
|
||||
{
|
||||
if (roots[0] > roots[2])
|
||||
swap(roots[0], roots[2]);
|
||||
btSwap(roots[0], roots[2]);
|
||||
if (roots[1] > roots[2])
|
||||
swap(roots[1], roots[2]);
|
||||
btSwap(roots[1], roots[2]);
|
||||
}
|
||||
for (int r = 0; r < num_roots; ++r)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user