Every Unity.Mathematics using, alias and qualified name under Assets\Scripts and tools now names CultMath. The nine `using static ...noise;` lines are gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the float3 colour pair stays because the bridge has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
30 lines
527 B
C#
30 lines
527 B
C#
using System.Collections;
|
|
using MIConvexHull;
|
|
using CultMath;
|
|
using static CultMath.math;
|
|
|
|
public class Vertex3 : IVertex
|
|
{
|
|
public float[] Position => new[] {StoredPosition.x, StoredPosition.y};
|
|
|
|
public float3 StoredPosition;
|
|
|
|
public Vertex3(float x, float y, float z)
|
|
{
|
|
StoredPosition = float3(x, y, z);
|
|
}
|
|
|
|
public Vertex3(float3 pos)
|
|
{
|
|
StoredPosition = pos;
|
|
}
|
|
|
|
public float3 ToFloat3() {
|
|
return StoredPosition;
|
|
}
|
|
|
|
public float Distance(Vertex3 v)
|
|
{
|
|
return length(StoredPosition-v.StoredPosition);
|
|
}
|
|
}
|