worked on mapview 3d stuff
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <Indoor/navMesh/NavMesh.h>
|
||||
#include <Indoor/navMesh/NavMeshFactory.h>
|
||||
#include <Indoor/navMesh/NavMeshFactoryListener.h>
|
||||
#include <Indoor/wifi/estimate/ray3/ModelFactory.h>
|
||||
#include <Indoor/floorplan/3D/Builder.h>
|
||||
|
||||
#include "RenderTriangle.h"
|
||||
|
||||
@@ -37,18 +37,18 @@ const std::vector<Material> mats = {
|
||||
|
||||
};
|
||||
|
||||
int FloorplanRendererModel::getMaterial(const Ray3D::Obstacle3D& o) const {
|
||||
int FloorplanRendererModel::getMaterial(const Floorplan3D::Obstacle3D& o) const {
|
||||
|
||||
if (o.type == Ray3D::Obstacle3D::Type::ERROR) {return 0;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::ERROR) {return 0;}
|
||||
|
||||
if (o.type == Ray3D::Obstacle3D::Type::GROUND_OUTDOOR) {return 1;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::GROUND_INDOOR) {return 2;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::STAIR) {return 3;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::HANDRAIL) {return 4;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::OBJECT) {return 12;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::GROUND_OUTDOOR) {return 1;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::GROUND_INDOOR) {return 2;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::STAIR) {return 3;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::HANDRAIL) {return 4;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::OBJECT) {return 12;}
|
||||
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR && o.mat == Floorplan::Material::GLASS) {return 5;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR) {return 6;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::DOOR && o.mat == Floorplan::Material::GLASS) {return 5;}
|
||||
if (o.type == Floorplan3D::Obstacle3D::Type::DOOR) {return 6;}
|
||||
|
||||
if (o.mat == Floorplan::Material::CONCRETE) {return 7;}
|
||||
if (o.mat == Floorplan::Material::GLASS) {return 8;}
|
||||
@@ -66,7 +66,7 @@ FloorplanRendererModel::FloorplanRendererModel() {
|
||||
;
|
||||
}
|
||||
|
||||
Ray3D::FloorplanMesh& FloorplanRendererModel::getMesh() {
|
||||
Floorplan3D::FloorplanMesh& FloorplanRendererModel::getMesh() {
|
||||
return mesh;
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ void FloorplanRendererModel::rebuild(Floorplan::IndoorMap* im) {
|
||||
|
||||
// rebuild the mesh
|
||||
try {
|
||||
Ray3D::ModelFactory fac(im);
|
||||
Floorplan3D::Builder fac(im);
|
||||
fac.exportDoors = showDoors;
|
||||
mesh = fac.getMesh();
|
||||
for (const Ray3D::Obstacle3D& obs : mesh.elements) {
|
||||
for (const Floorplan3D::Obstacle3D& obs : mesh.elements) {
|
||||
const int matID = getMaterial(obs);
|
||||
const Material& mat = mats[matID];
|
||||
for (const Triangle3& tria : obs.triangles) {
|
||||
|
||||
Reference in New Issue
Block a user