mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Merge branch '3.6-beta' of https://github.com/esotericsoftware/spine-runtimes into 3.6-beta
This commit is contained in:
commit
b7efbb74eb
@ -1,4 +1,4 @@
|
||||
/******************************************************************************
|
||||
/******************************************************************************
|
||||
* Spine Runtimes Software License v2.5
|
||||
*
|
||||
* Copyright (c) 2013-2016, Esoteric Software
|
||||
@ -64,8 +64,9 @@ namespace Spine {
|
||||
while (vertexCount > 3) {
|
||||
// Find ear tip.
|
||||
int previous = vertexCount - 1, i = 0, next = 1;
|
||||
|
||||
// outer:
|
||||
while (true) {
|
||||
outer:
|
||||
if (!isConcave[i]) {
|
||||
int p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;
|
||||
float p1x = vertices[p1], p1y = vertices[p1 + 1];
|
||||
@ -77,7 +78,7 @@ namespace Spine {
|
||||
float vx = vertices[v], vy = vertices[v + 1];
|
||||
if (PositiveArea(p3x, p3y, p1x, p1y, vx, vy)) {
|
||||
if (PositiveArea(p1x, p1y, p2x, p2y, vx, vy)) {
|
||||
if (PositiveArea(p2x, p2y, p3x, p3y, vx, vy)) goto outer;
|
||||
if (PositiveArea(p2x, p2y, p3x, p3y, vx, vy)) goto outer; // break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,6 +97,7 @@ namespace Spine {
|
||||
i = next;
|
||||
next = (next + 1) % vertexCount;
|
||||
}
|
||||
outer:
|
||||
|
||||
// Cut ear tip.
|
||||
triangles.Add(indices[(vertexCount + i - 1) % vertexCount]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user