mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Minor polyhedron changes.
This commit is contained in:
parent
a669ef95c6
commit
60f44be298
@ -134,12 +134,6 @@ public boolean addVertex(Vector vertex) {
|
|||||||
|
|
||||||
centerAccum = centerAccum.add(vertex);
|
centerAccum = centerAccum.add(vertex);
|
||||||
|
|
||||||
/*if (contains(vertex)) {
|
|
||||||
return true;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
lastTriangle = null;
|
|
||||||
|
|
||||||
if (minimumPoint == null) {
|
if (minimumPoint == null) {
|
||||||
minimumPoint = maximumPoint = vertex;
|
minimumPoint = maximumPoint = vertex;
|
||||||
} else {
|
} else {
|
||||||
@ -194,12 +188,17 @@ public boolean addVertex(Vector vertex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!vertexBacklog.isEmpty()) {
|
if (!vertexBacklog.isEmpty()) {
|
||||||
|
// Remove the new vertex
|
||||||
vertices.remove(vertex);
|
vertices.remove(vertex);
|
||||||
|
|
||||||
|
// Clone, clear and work through the backlog
|
||||||
final List<Vector> vertexBacklog2 = new ArrayList<Vector>(vertexBacklog);
|
final List<Vector> vertexBacklog2 = new ArrayList<Vector>(vertexBacklog);
|
||||||
vertexBacklog.clear();
|
vertexBacklog.clear();
|
||||||
for (Vector vertex2 : vertexBacklog2) {
|
for (Vector vertex2 : vertexBacklog2) {
|
||||||
addVertex(vertex2);
|
addVertex(vertex2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Re-add the new vertex after the backlog.
|
||||||
vertices.add(vertex);
|
vertices.add(vertex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user