worked on 3D walls
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
#include "../../floorplan/v2/Floorplan.h"
|
||||
#include "../../floorplan/v2/FloorplanReader.h"
|
||||
#include "../../wifi/estimate/ray3/ModelFactory.h"
|
||||
#include "../../floorplan/3D/Builder.h"
|
||||
|
||||
using namespace Ray3D;
|
||||
using namespace Floorplan3D;
|
||||
|
||||
struct Wrapper {
|
||||
|
||||
@@ -140,37 +140,37 @@ TEST(BVH, tree3) {
|
||||
|
||||
}
|
||||
|
||||
TEST(BVH, treeMap) {
|
||||
//TEST(BVH, treeMap) {
|
||||
|
||||
std::string file = "/apps/SHL39.xml";
|
||||
Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(file);
|
||||
// std::string file = "/apps/SHL39.xml";
|
||||
// Floorplan::IndoorMap* map = Floorplan::Reader::readFromFile(file);
|
||||
|
||||
ModelFactory fac(map);
|
||||
fac.setExportCeilings(false);
|
||||
fac.setFloors({map->floors[3]});
|
||||
FloorplanMesh mesh = fac.getMesh();
|
||||
std::vector<Obstacle3D> obs = mesh.elements;
|
||||
// ModelFactory fac(map);
|
||||
// fac.setExportCeilings(false);
|
||||
// fac.setFloors({map->floors[3]});
|
||||
// FloorplanMesh mesh = fac.getMesh();
|
||||
// std::vector<Obstacle3D> obs = mesh.elements;
|
||||
|
||||
BVH3Debug<Obstacle3D, BoundingVolumeSphere3, WrapperObs3D> tree;
|
||||
// BVH3Debug<Obstacle3D, BoundingVolumeSphere3, WrapperObs3D> tree;
|
||||
|
||||
for (const Obstacle3D& o : obs) {
|
||||
tree.add(o);
|
||||
}
|
||||
// for (const Obstacle3D& o : obs) {
|
||||
// tree.add(o);
|
||||
// }
|
||||
|
||||
//tree.show(150);
|
||||
// //tree.show(150);
|
||||
|
||||
//int rounds = tree.optimize();
|
||||
// //int rounds = tree.optimize();
|
||||
|
||||
for (int i = 0; i < 200; ++i) {
|
||||
tree.optimize(1);
|
||||
//if (i%3==0) {
|
||||
tree.show(250, false);
|
||||
//}
|
||||
}
|
||||
// for (int i = 0; i < 200; ++i) {
|
||||
// tree.optimize(1);
|
||||
// //if (i%3==0) {
|
||||
// tree.show(250, false);
|
||||
// //}
|
||||
// }
|
||||
|
||||
int i = 0; (void) i;
|
||||
// int i = 0; (void) i;
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
TEST(BVH, treeRandom) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user