worked on navMesh stuff

- creation
- walking
- helper
This commit is contained in:
k-a-z-u
2018-01-10 16:57:19 +01:00
parent 3fc9688825
commit fee6cd3496
15 changed files with 1282 additions and 957 deletions

View File

@@ -3,6 +3,7 @@
#include "../Tests.h"
#include "../../navMesh/NavMeshFactory.h"
using namespace NM;
TEST(NavMeshFactory, build1) {
@@ -16,8 +17,8 @@ TEST(NavMeshFactory, build1) {
outline.outdoor = false;
outline.method = Floorplan::OutlineMethod::ADD;
NavMesh<NavMeshTriangle> nm;
NavMeshFactory<NavMeshTriangle> fac(&nm);
NavMesh<NM::NavMeshTriangle> nm;
NavMeshFactory<NM::NavMeshTriangle> fac(&nm);
fac.build(&map);
ASSERT_NEAR(0, nm.getBBox().getMin().x, 0.5);

View File

@@ -4,6 +4,7 @@
#include "../../navMesh/NavMeshFactory.h"
#include "../../navMesh/walk/NavMeshSub.h"
using namespace NM;
TEST(NavMeshSub, build1) {
@@ -17,11 +18,11 @@ TEST(NavMeshSub, build1) {
outline.outdoor = false;
outline.method = Floorplan::OutlineMethod::ADD;
NavMesh<NavMeshTriangle> nm;
NavMeshFactory<NavMeshTriangle> fac(&nm);
NavMesh<NM::NavMeshTriangle> nm;
NavMeshFactory<NM::NavMeshTriangle> fac(&nm);
fac.build(&map);
NavMeshLocation<NavMeshTriangle> loc = nm.getLocation(Point3(1,1,1));
NavMeshLocation<NM::NavMeshTriangle> loc = nm.getLocation(Point3(1,1,1));
}

View File

@@ -3,6 +3,7 @@
#include "../Tests.h"
#include "../../navMesh/NavMeshTriangle.h"
using namespace NM;
TEST(NavMeshTriangle, contains) {