2023-04-22 07:43:24 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DotRecast.Core
|
|
|
|
|
{
|
|
|
|
|
public struct SegmentVert
|
|
|
|
|
{
|
2023-06-03 15:47:26 +03:00
|
|
|
|
public RcVec3f vmin;
|
|
|
|
|
public RcVec3f vmax;
|
2023-04-22 07:43:24 +03:00
|
|
|
|
|
|
|
|
|
public float this[int index]
|
|
|
|
|
{
|
|
|
|
|
get => GetElement(index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float GetElement(int index)
|
|
|
|
|
{
|
|
|
|
|
switch (index)
|
|
|
|
|
{
|
|
|
|
|
case 0: return vmin.x;
|
|
|
|
|
case 1: return vmin.y;
|
|
|
|
|
case 2: return vmin.z;
|
|
|
|
|
case 3: return vmax.x;
|
|
|
|
|
case 4: return vmax.y;
|
|
|
|
|
case 5: return vmax.z;
|
|
|
|
|
default: throw new IndexOutOfRangeException($"{index}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|