More cleanups of custom classes in favor of .NET runtime types.

This commit is contained in:
hondacrx
2021-11-15 18:04:57 -05:00
parent a9a51d0641
commit b026ee7ef8
132 changed files with 373 additions and 6833 deletions
+4 -4
View File
@@ -17,11 +17,12 @@
using Framework.Constants;
using Framework.GameMath;
using Game.Collision;
using Game.DataStorage;
using System;
using System.Collections.Generic;
using System.IO;
using Game.Collision;
using System.Numerics;
namespace Game.Maps
{
@@ -175,7 +176,7 @@ namespace Game.Maps
_minHeightPlanes = new Plane[8];
for (uint quarterIndex = 0; quarterIndex < 8; ++quarterIndex)
_minHeightPlanes[quarterIndex] = new Plane(
_minHeightPlanes[quarterIndex] = Plane.CreateFromVertices(
new Vector3(boundGridCoords[indices[quarterIndex][0]][0], boundGridCoords[indices[quarterIndex][0]][1], minHeights[indices[quarterIndex][0]]),
new Vector3(boundGridCoords[indices[quarterIndex][1]][0], boundGridCoords[indices[quarterIndex][1]][1], minHeights[indices[quarterIndex][1]]),
new Vector3(boundGridCoords[indices[quarterIndex][2]][0], boundGridCoords[indices[quarterIndex][2]][1], minHeights[indices[quarterIndex][2]])
@@ -500,8 +501,7 @@ namespace Game.Maps
else
quarterIndex = gx > gy ? 1u : 0;
Ray ray = new(new Vector3(gx, gy, 0.0f), Vector3.ZAxis);
Ray ray = new(new Vector3(gx, gy, 0.0f), Vector3.UnitZ);
return ray.intersection(_minHeightPlanes[quarterIndex]).Z;
}