From ba224cda7303654d93996c5c2830f76386410e8e Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Fri, 4 May 2018 21:43:10 -0300 Subject: [PATCH] rename function --- include/bounce/dynamics/contacts/contact_cluster.h | 4 ++-- src/bounce/dynamics/contacts/contact_cluster.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/bounce/dynamics/contacts/contact_cluster.h b/include/bounce/dynamics/contacts/contact_cluster.h index f8c0d44..4d316e9 100644 --- a/include/bounce/dynamics/contacts/contact_cluster.h +++ b/include/bounce/dynamics/contacts/contact_cluster.h @@ -33,8 +33,8 @@ struct b3ClusterPolygonVertex // Used for contact cluster reduction. typedef b3Array b3ClusterPolygon; -// Weld a convex polygon such that the polygon normal points to a given direction. -void b3WeldPolygon(b3ClusterPolygon& pOut, +// Sort a convex polygon such that the polygon normal points to a given normal. +void b3SortPolygon(b3ClusterPolygon& pOut, const b3ClusterPolygon& pIn, const b3Vec3& pNormal); // Reduce a set of contact points to a quad (approximate convex polygon). diff --git a/src/bounce/dynamics/contacts/contact_cluster.cpp b/src/bounce/dynamics/contacts/contact_cluster.cpp index 3646a5b..1c4be98 100644 --- a/src/bounce/dynamics/contacts/contact_cluster.cpp +++ b/src/bounce/dynamics/contacts/contact_cluster.cpp @@ -30,7 +30,7 @@ static B3_FORCE_INLINE bool b3IsCCW(const b3Vec3& A, const b3Vec3& B, const b3Ve return b3IsCCW(A, B, C, N) && b3IsCCW(C, D, A, N); } -void b3WeldPolygon(b3ClusterPolygon& pOut, +void b3SortPolygon(b3ClusterPolygon& pOut, const b3ClusterPolygon& pIn, const b3Vec3& pNormal) { B3_ASSERT(pOut.IsEmpty()); @@ -65,7 +65,7 @@ void b3ReducePolygon(b3ClusterPolygon& pOut, pOut.Reserve(pIn.Count()); if (pIn.Count() <= B3_MAX_MANIFOLD_POINTS) { - b3WeldPolygon(pOut, pIn, pNormal); + b3SortPolygon(pOut, pIn, pNormal); return; } @@ -193,7 +193,7 @@ void b3ReducePolygon(b3ClusterPolygon& pOut, B3_ASSERT(pOut.Count() <= B3_MAX_MANIFOLD_POINTS); b3StackArray quad; - b3WeldPolygon(quad, pOut, pNormal); + b3SortPolygon(quad, pOut, pNormal); // Output polygon pOut = quad;