Compare commits
2 Commits
75124a4f62
...
14202714cc
Author | SHA1 | Date | |
---|---|---|---|
14202714cc | |||
ce0c23805a |
@@ -1,6 +1,5 @@
|
||||
using Cryville.EEW.Core.Map;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
@@ -67,7 +66,6 @@ namespace Cryville.EEW.Unity.Map {
|
||||
_downloadDone = true;
|
||||
}
|
||||
|
||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
||||
void Update() {
|
||||
if (_downloadDone) {
|
||||
try {
|
||||
@@ -100,7 +98,6 @@ namespace Cryville.EEW.Unity.Map {
|
||||
_callback?.Invoke(this);
|
||||
}
|
||||
|
||||
[SuppressMessage("CodeQuality", "IDE0051", Justification = "Unity message")]
|
||||
void OnDestroy() {
|
||||
if (_req != null) {
|
||||
_req.Abort();
|
||||
|
@@ -77,7 +77,13 @@ namespace Cryville.EEW.Unity.Map {
|
||||
DTSweep.Triangulate(tcx);
|
||||
|
||||
var codeToIndex = new Dictionary<uint, int>();
|
||||
var vertices = ArrayPool<Vector3>.Shared.Rent(convertedPolygon.Points.Count);
|
||||
int vertexCount = convertedPolygon.Points.Count;
|
||||
if (convertedPolygon.Holes != null) {
|
||||
foreach (var hole in convertedPolygon.Holes) {
|
||||
vertexCount += hole.Points.Count;
|
||||
}
|
||||
}
|
||||
var vertices = ArrayPool<Vector3>.Shared.Rent(vertexCount);
|
||||
var triangles = ArrayPool<int>.Shared.Rent(convertedPolygon.Triangles.Count * 3);
|
||||
int vi = 0, ii = 0;
|
||||
foreach (var tri in convertedPolygon.Triangles) {
|
||||
|
Reference in New Issue
Block a user