Small formatting change to dividePoly()
This commit is contained in:
parent
1b04dc9c80
commit
ad7a13cbf3
@ -170,17 +170,17 @@ void rcAddSpan(rcContext* /*ctx*/, rcHeightfield& hf, const int x, const int y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// divides a convex polygons into two convex polygons on both sides of a line
|
// divides a convex polygons into two convex polygons on both sides of a line
|
||||||
static void dividePoly(const float* in, int nbIn,
|
static void dividePoly(const float* in, int nin,
|
||||||
float* out1, int* nb1,
|
float* out1, int* nout1,
|
||||||
float* out2, int* nb2,
|
float* out2, int* nout2,
|
||||||
float x, int axis)
|
float x, int axis)
|
||||||
{
|
{
|
||||||
float d[12];
|
float d[12];
|
||||||
for (int i = 0; i < nbIn; ++i)
|
for (int i = 0; i < nin; ++i)
|
||||||
d[i] = x - in[i*3+axis];
|
d[i] = x - in[i*3+axis];
|
||||||
|
|
||||||
int m = 0, n = 0;
|
int m = 0, n = 0;
|
||||||
for (int i = 0, j = nbIn-1; i < nbIn; j=i, ++i)
|
for (int i = 0, j = nin-1; i < nin; j=i, ++i)
|
||||||
{
|
{
|
||||||
bool ina = d[j] >= 0;
|
bool ina = d[j] >= 0;
|
||||||
bool inb = d[i] >= 0;
|
bool inb = d[i] >= 0;
|
||||||
@ -211,8 +211,8 @@ static void dividePoly(const float* in, int nbIn,
|
|||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
*nb1 = m;
|
*nout1 = m;
|
||||||
*nb2 = n;
|
*nout2 = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user