2023-03-14 08:02:43 +03:00
|
|
|
/*
|
|
|
|
recast4j Copyright (c) 2015-2019 Piotr Piastucki piotr@jtilia.org
|
2024-05-25 16:42:57 +03:00
|
|
|
DotRecast Copyright (c) 2023-2024 Choi Ikpil ikpil@naver.com
|
2023-03-14 08:02:43 +03:00
|
|
|
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
|
|
warranty. In no event will the authors be held liable for any damages
|
|
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
|
|
including commercial applications, and to alter it and redistribute it
|
|
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
|
|
claim that you wrote the original software. If you use this software
|
|
|
|
in a product, an acknowledgment in the product documentation would be
|
|
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
|
*/
|
|
|
|
|
2023-10-16 17:55:34 +03:00
|
|
|
using DotRecast.Core.Numerics;
|
2023-03-14 08:02:43 +03:00
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
namespace DotRecast.Detour.Test;
|
|
|
|
|
|
|
|
public abstract class AbstractDetourTest
|
|
|
|
{
|
|
|
|
protected static readonly long[] startRefs =
|
|
|
|
{
|
|
|
|
281474976710696L, 281474976710773L, 281474976710680L, 281474976710753L, 281474976710733L
|
|
|
|
};
|
|
|
|
|
|
|
|
protected static readonly long[] endRefs =
|
|
|
|
{
|
|
|
|
281474976710721L, 281474976710767L, 281474976710758L, 281474976710731L, 281474976710772L
|
|
|
|
};
|
|
|
|
|
2023-06-03 15:47:26 +03:00
|
|
|
protected static readonly RcVec3f[] startPoss =
|
2023-03-14 08:02:43 +03:00
|
|
|
{
|
2023-10-12 17:52:32 +03:00
|
|
|
new RcVec3f(22.60652f, 10.197294f, -45.918674f),
|
|
|
|
new RcVec3f(22.331268f, 10.197294f, -1.0401875f),
|
|
|
|
new RcVec3f(18.694363f, 15.803535f, -73.090416f),
|
|
|
|
new RcVec3f(0.7453353f, 10.197294f, -5.94005f),
|
|
|
|
new RcVec3f(-20.651257f, 5.904126f, -13.712508f)
|
2023-03-14 08:02:43 +03:00
|
|
|
};
|
|
|
|
|
2023-06-03 15:47:26 +03:00
|
|
|
protected static readonly RcVec3f[] endPoss =
|
2023-03-14 08:02:43 +03:00
|
|
|
{
|
2023-10-12 17:52:32 +03:00
|
|
|
new RcVec3f(6.4576626f, 10.197294f, -18.33406f),
|
|
|
|
new RcVec3f(-5.8023443f, 0.19729415f, 3.008419f),
|
|
|
|
new RcVec3f(38.423977f, 10.197294f, -0.116066754f),
|
|
|
|
new RcVec3f(0.8635526f, 10.197294f, -10.31032f),
|
|
|
|
new RcVec3f(18.784092f, 10.197294f, 3.0543678f),
|
2023-03-14 08:02:43 +03:00
|
|
|
};
|
|
|
|
|
2023-06-08 15:38:02 +03:00
|
|
|
protected DtNavMeshQuery query;
|
|
|
|
protected DtNavMesh navmesh;
|
2023-03-14 08:02:43 +03:00
|
|
|
|
|
|
|
[SetUp]
|
2023-05-05 02:44:48 +03:00
|
|
|
public void SetUp()
|
2023-03-14 08:02:43 +03:00
|
|
|
{
|
2023-05-05 02:44:48 +03:00
|
|
|
navmesh = CreateNavMesh();
|
2023-06-08 15:38:02 +03:00
|
|
|
query = new DtNavMeshQuery(navmesh);
|
2023-03-14 08:02:43 +03:00
|
|
|
}
|
|
|
|
|
2023-06-08 15:38:02 +03:00
|
|
|
protected DtNavMesh CreateNavMesh()
|
2023-03-14 08:02:43 +03:00
|
|
|
{
|
2024-05-12 16:05:19 +03:00
|
|
|
var mesh = new DtNavMesh();
|
2024-05-25 17:01:16 +03:00
|
|
|
mesh.Init(TestMeshDataFactory.Create(), 6, 0);
|
2024-05-12 16:05:19 +03:00
|
|
|
return mesh;
|
2023-03-14 08:02:43 +03:00
|
|
|
}
|
|
|
|
}
|