Update
This commit is contained in:
parent
124b9d1e7c
commit
3f374a4713
85 changed files with 2281 additions and 2272 deletions
|
@ -71,12 +71,12 @@ int pointIsInTriangle(int px, int py, int tp[6])
|
|||
|
||||
int w2 = (tp[i1 + 1] - py) * (tp[i2] - tp[i1]) - (tp[i1] - px) * (tp[i2 + 1] - tp[i1 + 1]);
|
||||
int sign2 = w2 > 0 ? 1 : (w2 < 0 ? -1 : 0);
|
||||
|
||||
|
||||
if (sign * sign2 == -1) // includes edges
|
||||
//if (sign != sign2) // excludes edges
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue