Skip to content

Commit

Permalink
Lift Cell.Triangle to a namespace-level class
Browse files Browse the repository at this point in the history
  • Loading branch information
Majiir committed Sep 1, 2014
1 parent c8c0be9 commit 87b606c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Plugin/GeodesicGrid/Cell.cs
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions 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;
}
}
}
1 change: 1 addition & 0 deletions Plugin/Kethane.csproj
Expand Up @@ -54,6 +54,7 @@
<Compile Include="GeodesicGrid\CellSet.cs" />
<Compile Include="GeodesicGrid\ChildType.cs" />
<Compile Include="GeodesicGrid\IntMath.cs" />
<Compile Include="GeodesicGrid\TriangleHit.cs" />
<Compile Include="InstallCleanup.cs" />
<Compile Include="IWindowToggle.cs" />
<Compile Include="LegacyResourceGenerator.cs" />
Expand Down

0 comments on commit 87b606c

Please sign in to comment.