Make Geometry Unity sources C# 9 compatible
This commit is contained in:
parent
ace29fe2b5
commit
4fcb181d8d
4 changed files with 12 additions and 4 deletions
|
|
@ -5,7 +5,8 @@ using System.Runtime.InteropServices;
|
|||
using CultMath;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameCult.Geometry.Unity;
|
||||
namespace GameCult.Geometry.Unity
|
||||
{
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)] public readonly struct PlanetaryPageInputGpu { public PlanetaryPageInputGpu(Vector4 directionRadius, Vector4 sampling) { DirectionRadius = directionRadius; Sampling = sampling; } public readonly Vector4 DirectionRadius; public readonly Vector4 Sampling; }
|
||||
[StructLayout(LayoutKind.Sequential)] public readonly struct PlanetaryPageMetadataGpu { public PlanetaryPageMetadataGpu(Vector4 address, Vector4 layout, Vector4 bounds, Vector4 state) { Address = address; Layout = layout; Bounds = bounds; State = state; } public readonly Vector4 Address; public readonly Vector4 Layout; public readonly Vector4 Bounds; public readonly Vector4 State; }
|
||||
|
|
@ -27,3 +28,4 @@ public static class PlanetaryPageUploadBuilder
|
|||
}
|
||||
private static Vector4 ToUnity(float4 value) => new(value.x, value.y, value.z, value.w);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ using CultMath;
|
|||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace GameCult.Geometry.Unity;
|
||||
namespace GameCult.Geometry.Unity
|
||||
{
|
||||
|
||||
public static class PlanetaryPatchMeshAdapter
|
||||
{
|
||||
|
|
@ -25,3 +26,4 @@ public static class PlanetaryPatchMeshAdapter
|
|||
mesh.RecalculateBounds(); return mesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ using UnityEditor;
|
|||
using UnityEngine;
|
||||
using GameCult.Geometry.Unity.Samples;
|
||||
|
||||
namespace GameCult.Geometry.Unity.Samples.Editor;
|
||||
namespace GameCult.Geometry.Unity.Samples.Editor
|
||||
{
|
||||
|
||||
public static class GameCultGeometryPlanetaryViewerMenu
|
||||
{
|
||||
|
|
@ -25,3 +26,4 @@ public static class GameCultGeometryPlanetaryViewerMenu
|
|||
camera.farClipPlane = 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using CultMath;
|
|||
using GameCult.Geometry;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameCult.Geometry.Unity.Samples;
|
||||
namespace GameCult.Geometry.Unity.Samples
|
||||
{
|
||||
|
||||
[ExecuteAlways]
|
||||
public sealed class GameCultGeometryPlanetaryViewer : MonoBehaviour
|
||||
|
|
@ -139,3 +140,4 @@ public sealed class GameCultGeometryPlanetaryViewer : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue