remove unused function

This commit is contained in:
ikpil 2023-05-14 12:20:08 +09:00
parent dd399ed9b8
commit 9f6f1a0b33
3 changed files with 3 additions and 57 deletions

View File

@ -119,17 +119,6 @@ namespace DotRecast.Core
return dest;
}
public static Vector3f VMad(float[] v1, Vector3f v2, float s)
{
Vector3f dest = new Vector3f();
dest.x = v1[0] + v2.x * s;
dest.y = v1[1] + v2.y * s;
dest.z = v1[2] + v2.z * s;
return dest;
}
/// Performs a linear interpolation between two vectors. (@p v1 toward @p
/// v2)
/// @param[out] dest The result vector. [(x, y, x)]
@ -164,15 +153,6 @@ namespace DotRecast.Core
return dest;
}
public static Vector3f VSub(Vector3f v1, float[] v2)
{
Vector3f dest = new Vector3f();
dest.x = v1.x - v2[0];
dest.y = v1.y - v2[1];
dest.z = v1.z - v2[2];
return dest;
}
public static Vector3f VAdd(Vector3f v1, Vector3f v2)
{
Vector3f dest = new Vector3f();
@ -210,13 +190,6 @@ namespace DotRecast.Core
@out.z = @in[i + 2];
}
public static void VMin(float[] @out, float[] @in, int i)
{
@out[0] = Math.Min(@out[0], @in[i]);
@out[1] = Math.Min(@out[1], @in[i + 1]);
@out[2] = Math.Min(@out[2], @in[i + 2]);
}
public static void VMin(ref Vector3f @out, float[] @in, int i)
{
@out.x = Math.Min(@out.x, @in[i]);
@ -225,13 +198,6 @@ namespace DotRecast.Core
}
public static void VMax(float[] @out, float[] @in, int i)
{
@out[0] = Math.Max(@out[0], @in[i]);
@out[1] = Math.Max(@out[1], @in[i + 1]);
@out[2] = Math.Max(@out[2], @in[i + 2]);
}
public static void VMax(ref Vector3f @out, float[] @in, int i)
{
@out.x = Math.Max(@out.x, @in[i]);
@ -244,22 +210,6 @@ namespace DotRecast.Core
/// @param[in] v1 A point. [(x, y, z)]
/// @param[in] v2 A point. [(x, y, z)]
/// @return The distance between the two points.
public static float VDist(float[] v1, float[] v2)
{
float dx = v2[0] - v1[0];
float dy = v2[1] - v1[1];
float dz = v2[2] - v1[2];
return (float)Math.Sqrt(dx * dx + dy * dy + dz * dz);
}
public static float VDist(Vector3f v1, float[] v2)
{
float dx = v2[0] - v1.x;
float dy = v2[1] - v1.y;
float dz = v2[2] - v1.z;
return (float)Math.Sqrt(dx * dx + dy * dy + dz * dz);
}
public static float VDist(Vector3f v1, Vector3f v2)
{
float dx = v2.x - v1.x;
@ -394,11 +344,6 @@ namespace DotRecast.Core
///
/// Basically, this function will return true if the specified points are
/// close enough to eachother to be considered colocated.
public static bool VEqual(float[] p0, float[] p1)
{
return VEqual(p0, p1, EQUAL_THRESHOLD);
}
public static bool VEqual(Vector3f p0, Vector3f p1)
{
return VEqual(p0, p1, EQUAL_THRESHOLD);

View File

@ -907,8 +907,8 @@ namespace DotRecast.Detour.Crowd
private List<CrowdNeighbour> GetNeighbours(Vector3f pos, float height, float range, CrowdAgent skip, ProximityGrid grid)
{
List<CrowdNeighbour> result = new List<CrowdNeighbour>();
HashSet<CrowdAgent> proxAgents = grid.QueryItems(pos.x - range, pos.z - range, pos.x + range, pos.z + range);
List<CrowdNeighbour> result = new List<CrowdNeighbour>(proxAgents.Count);
foreach (CrowdAgent ag in proxAgents)
{
if (ag == skip)

View File

@ -52,7 +52,7 @@ namespace DotRecast.Detour.Crowd
y = (int)uy;
}
void Clear()
public void Clear()
{
_items.Clear();
}
@ -80,6 +80,7 @@ namespace DotRecast.Detour.Crowd
}
}
// 해당 셀 사이즈의 크기로 x ~ y 영역을 찾아, 군집 에이전트를 가져오는 코드
public HashSet<CrowdAgent> QueryItems(float minx, float miny, float maxx, float maxy)
{
int iminx = (int)Math.Floor(minx * _invCellSize);