From 87b606c5571e6542ad1f211dabc9d0683011bcac Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Mon, 1 Sep 2014 19:56:55 -0400 Subject: [PATCH] Lift Cell.Triangle to a namespace-level class --- Plugin/GeodesicGrid/Cell.cs | 15 --------------- Plugin/GeodesicGrid/TriangleHit.cs | 19 +++++++++++++++++++ Plugin/Kethane.csproj | 1 + 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 Plugin/GeodesicGrid/TriangleHit.cs diff --git a/Plugin/GeodesicGrid/Cell.cs b/Plugin/GeodesicGrid/Cell.cs index 3ef81ac..bc29b05 100644 --- a/Plugin/GeodesicGrid/Cell.cs +++ b/Plugin/GeodesicGrid/Cell.cs @@ -380,21 +380,6 @@ private static bool sphereIntersection(Ray ray, float radius, out Vector3? point } } - public struct TriangleHit - { - public Triangle Triangle { get; private set; } - public float Distance { get; private set; } - public Vector3 BarycentricCoordinate { get; private set; } - - public TriangleHit(Triangle triangle, float distance, Vector3 barycentricCoordinate) - : this() - { - Triangle = triangle; - Distance = distance; - BarycentricCoordinate = barycentricCoordinate; - } - } - #endregion #region Searching diff --git a/Plugin/GeodesicGrid/TriangleHit.cs b/Plugin/GeodesicGrid/TriangleHit.cs new file mode 100644 index 0000000..ece589e --- /dev/null +++ b/Plugin/GeodesicGrid/TriangleHit.cs @@ -0,0 +1,19 @@ +using Vector3 = UnityEngine.Vector3; + +namespace Kethane.GeodesicGrid +{ + public struct TriangleHit + { + public Cell.Triangle Triangle { get; private set; } + public float Distance { get; private set; } + public Vector3 BarycentricCoordinate { get; private set; } + + public TriangleHit(Cell.Triangle triangle, float distance, Vector3 barycentricCoordinate) + : this() + { + Triangle = triangle; + Distance = distance; + BarycentricCoordinate = barycentricCoordinate; + } + } +} diff --git a/Plugin/Kethane.csproj b/Plugin/Kethane.csproj index 26402db..537b4bf 100644 --- a/Plugin/Kethane.csproj +++ b/Plugin/Kethane.csproj @@ -54,6 +54,7 @@ +