From 4acb0a163a782066207a711fd6c258c11766dcf2 Mon Sep 17 00:00:00 2001 From: ikpil Date: Fri, 3 May 2024 22:09:37 +0900 Subject: [PATCH] SOH for Gizmo --- src/DotRecast.Recast.Demo/Tools/GizmoRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotRecast.Recast.Demo/Tools/GizmoRenderer.cs b/src/DotRecast.Recast.Demo/Tools/GizmoRenderer.cs index 2b8cf87..a6f4083 100644 --- a/src/DotRecast.Recast.Demo/Tools/GizmoRenderer.cs +++ b/src/DotRecast.Recast.Demo/Tools/GizmoRenderer.cs @@ -65,7 +65,7 @@ public static class GizmoRenderer var trX = new RcVec3f(box.halfEdges[0].X, box.halfEdges[1].X, box.halfEdges[2].X); var trY = new RcVec3f(box.halfEdges[0].Y, box.halfEdges[1].Y, box.halfEdges[2].Y); var trZ = new RcVec3f(box.halfEdges[0].Z, box.halfEdges[1].Z, box.halfEdges[2].Z); - float[] vertices = new float[8 * 3]; + Span vertices = stackalloc float[8 * 3]; for (int i = 0; i < 8; i++) { vertices[i * 3 + 0] = RcVec3f.Dot(RcBoxGizmo.VERTS[i], trX) + box.center.X;