rename function
This commit is contained in:
parent
cd535f8c49
commit
ba224cda73
@ -33,8 +33,8 @@ struct b3ClusterPolygonVertex
|
|||||||
// Used for contact cluster reduction.
|
// Used for contact cluster reduction.
|
||||||
typedef b3Array<b3ClusterPolygonVertex> b3ClusterPolygon;
|
typedef b3Array<b3ClusterPolygonVertex> b3ClusterPolygon;
|
||||||
|
|
||||||
// Weld a convex polygon such that the polygon normal points to a given direction.
|
// Sort a convex polygon such that the polygon normal points to a given normal.
|
||||||
void b3WeldPolygon(b3ClusterPolygon& pOut,
|
void b3SortPolygon(b3ClusterPolygon& pOut,
|
||||||
const b3ClusterPolygon& pIn, const b3Vec3& pNormal);
|
const b3ClusterPolygon& pIn, const b3Vec3& pNormal);
|
||||||
|
|
||||||
// Reduce a set of contact points to a quad (approximate convex polygon).
|
// Reduce a set of contact points to a quad (approximate convex polygon).
|
||||||
|
@ -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);
|
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)
|
const b3ClusterPolygon& pIn, const b3Vec3& pNormal)
|
||||||
{
|
{
|
||||||
B3_ASSERT(pOut.IsEmpty());
|
B3_ASSERT(pOut.IsEmpty());
|
||||||
@ -65,7 +65,7 @@ void b3ReducePolygon(b3ClusterPolygon& pOut,
|
|||||||
pOut.Reserve(pIn.Count());
|
pOut.Reserve(pIn.Count());
|
||||||
if (pIn.Count() <= B3_MAX_MANIFOLD_POINTS)
|
if (pIn.Count() <= B3_MAX_MANIFOLD_POINTS)
|
||||||
{
|
{
|
||||||
b3WeldPolygon(pOut, pIn, pNormal);
|
b3SortPolygon(pOut, pIn, pNormal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void b3ReducePolygon(b3ClusterPolygon& pOut,
|
|||||||
B3_ASSERT(pOut.Count() <= B3_MAX_MANIFOLD_POINTS);
|
B3_ASSERT(pOut.Count() <= B3_MAX_MANIFOLD_POINTS);
|
||||||
|
|
||||||
b3StackArray<b3ClusterPolygonVertex, 32> quad;
|
b3StackArray<b3ClusterPolygonVertex, 32> quad;
|
||||||
b3WeldPolygon(quad, pOut, pNormal);
|
b3SortPolygon(quad, pOut, pNormal);
|
||||||
|
|
||||||
// Output polygon
|
// Output polygon
|
||||||
pOut = quad;
|
pOut = quad;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user