worked on 3D model creation

This commit is contained in:
k-a-z-u
2018-02-06 17:34:29 +01:00
parent 0bb1b707de
commit a35e043196
15 changed files with 1442 additions and 1091 deletions

View File

@@ -189,19 +189,41 @@ namespace Floorplan {
struct POI;
struct Stair;
struct Elevator;
struct GroundTruthPoint;
struct GroundTruthPoint;
using FloorOutline = std::vector<FloorOutlinePolygon*>;
using FloorObstacles = std::vector<FloorObstacle*>;
using FloorAccessPoints = std::vector<AccessPoint*>;
using FloorBeacons = std::vector<Beacon*>;
using FloorFingerprintLocations = std::vector<FingerprintLocation*>;
using FloorRegions = std::vector<FloorRegion*>;
using FloorUnderlays = std::vector<UnderlayImage*>;
using FloorPOIs = std::vector<POI*>;
using FloorStairs = std::vector<Stair*>;
using FloorElevators = std::vector<Elevator*>;
using FloorGroundTruthPoints = std::vector<GroundTruthPoint*>;
struct FloorOutline : public std::vector<FloorOutlinePolygon*> {
bool enabled = true;
};
struct FloorObstacles : public std::vector<FloorObstacle*> {
bool enabled = true;
};
struct FloorAccessPoints : public std::vector<AccessPoint*> {
bool enabled = true;
};
struct FloorBeacons : public std::vector<Beacon*> {
bool enabled = true;
};
struct FloorFingerprintLocations : public std::vector<FingerprintLocation*> {
bool enabled = true;
};
struct FloorRegions : public std::vector<FloorRegion*> {
bool enabled = true;
};
struct FloorUnderlays : public std::vector<UnderlayImage*> {
bool enabled = true;
};
struct FloorPOIs : public std::vector<POI*> {
bool enabled = true;
};
struct FloorStairs : public std::vector<Stair*> {
bool enabled = true;
};
struct FloorElevators : public std::vector<Elevator*> {
bool enabled = true;
};
struct FloorGroundTruthPoints : public std::vector<GroundTruthPoint*> {
bool enabled = true;
};
/** describes one floor within the map, starting at a given height */
struct Floor {
@@ -567,6 +589,8 @@ namespace Floorplan {
/** describe the floorplan's location on earth */
struct EarthRegistration {
bool enabled = true;
/** all available correspondences: earth <-> map */
std::vector<EarthPosMapPos*> correspondences;

View File

@@ -137,15 +137,15 @@ namespace Floorplan {
if (std::string("pois") == n->Name()) {floor->pois = parseFloorPOIs(n);}
if (std::string("stairs") == n->Name()) {floor->stairs = parseFloorStairs(n);}
if (std::string("elevators") == n->Name()) {floor->elevators = parseFloorElevators(n);}
if (std::string("gtpoints") == n->Name()) {floor->gtpoints = parseFloorGroundTruthPoints(n);}
if (std::string("gtpoints") == n->Name()) {floor->gtpoints = parseFloorGroundTruthPoints(n);}
}
return floor;
}
/** parse the <elevators> tag */
static std::vector<Elevator*> parseFloorElevators(const XMLElem* el) {
std::vector<Elevator*> vec;
static FloorElevators parseFloorElevators(const XMLElem* el) {
FloorElevators vec;
FOREACH_NODE(n, el) {
if (std::string("elevator") == n->Name()) { vec.push_back(parseFloorElevator(n)); }
}
@@ -153,8 +153,8 @@ namespace Floorplan {
}
/** parse the <stairs> tag */
static std::vector<Stair*> parseFloorStairs(const XMLElem* el) {
std::vector<Stair*> vec;
static FloorStairs parseFloorStairs(const XMLElem* el) {
FloorStairs vec;
FOREACH_NODE(n, el) {
if (std::string("stair") == n->Name()) { vec.push_back(parseFloorStair(n)); }
}
@@ -207,8 +207,8 @@ namespace Floorplan {
/** parse the <pois> tag */
static std::vector<POI*> parseFloorPOIs(const XMLElem* el) {
std::vector<POI*> vec;
static FloorPOIs parseFloorPOIs(const XMLElem* el) {
FloorPOIs vec;
FOREACH_NODE(n, el) {
if (std::string("poi") == n->Name()) { vec.push_back(parseFloorPOI(n)); }
}
@@ -225,27 +225,26 @@ namespace Floorplan {
}
/** parse the <gtpoints> tag */
static std::vector<GroundTruthPoint*> parseFloorGroundTruthPoints(const XMLElem* el) {
std::vector<GroundTruthPoint*> vec;
FOREACH_NODE(n, el) {
if (std::string("gtpoint") == n->Name()) { vec.push_back(parseFloorGroundTruthPoint(n)); }
}
return vec;
}
/** parse a <gtpoint> tag */
static GroundTruthPoint* parseFloorGroundTruthPoint(const XMLElem* el) {
GroundTruthPoint* gtp = new GroundTruthPoint();
gtp->id = el->IntAttribute("id");
gtp->pos = parsePoint3(el);
return gtp;
}
/** parse the <gtpoints> tag */
static FloorGroundTruthPoints parseFloorGroundTruthPoints(const XMLElem* el) {
FloorGroundTruthPoints vec;
FOREACH_NODE(n, el) {
if (std::string("gtpoint") == n->Name()) { vec.push_back(parseFloorGroundTruthPoint(n)); }
}
return vec;
}
/** parse a <gtpoint> tag */
static GroundTruthPoint* parseFloorGroundTruthPoint(const XMLElem* el) {
GroundTruthPoint* gtp = new GroundTruthPoint();
gtp->id = el->IntAttribute("id");
gtp->pos = parsePoint3(el);
return gtp;
}
/** parse the <accesspoints> tag */
static std::vector<AccessPoint*> parseFloorAccessPoints(const XMLElem* el) {
std::vector<AccessPoint*> vec;
static FloorAccessPoints parseFloorAccessPoints(const XMLElem* el) {
FloorAccessPoints vec;
FOREACH_NODE(n, el) {
if (std::string("accesspoint") == n->Name()) { vec.push_back(parseAccessPoint(n)); }
}
@@ -317,8 +316,8 @@ namespace Floorplan {
/** parse the <beacons> tag */
static std::vector<Beacon*> parseFloorBeacons(const XMLElem* el) {
std::vector<Beacon*> vec;
static FloorBeacons parseFloorBeacons(const XMLElem* el) {
FloorBeacons vec;
FOREACH_NODE(n, el) {
if (std::string("beacon") == n->Name()) { vec.push_back(parseBeacon(n)); }
}
@@ -341,9 +340,9 @@ namespace Floorplan {
}
/** parse <fingerprints> <location>s */
static std::vector<FingerprintLocation*> parseFingerprintLocations(const XMLElem* el) {
static FloorFingerprintLocations parseFingerprintLocations(const XMLElem* el) {
assertNode("fingerprints", el);
std::vector<FingerprintLocation*> vec;
FloorFingerprintLocations vec;
FOREACH_NODE(n, el) {
if (std::string("location") == n->Name()) { vec.push_back(parseFingerprintLocation(n)); }
}
@@ -363,8 +362,8 @@ namespace Floorplan {
return fpl;
}
static std::vector<FloorRegion*> parseFloorRegions(const XMLElem* el) {
std::vector<FloorRegion*> vec;
static FloorRegions parseFloorRegions(const XMLElem* el) {
FloorRegions vec;
FOREACH_NODE(n, el) {
if (std::string("region") == n->Name()) { vec.push_back(parseFloorRegion(n)); }
}
@@ -380,9 +379,9 @@ namespace Floorplan {
}
/** parse the <obstacles> tag */
static std::vector<FloorObstacle*> parseFloorObstacles(const XMLElem* el) {
static FloorObstacles parseFloorObstacles(const XMLElem* el) {
assertNode("obstacles", el);
std::vector<FloorObstacle*> obstacles;
FloorObstacles obstacles;
FOREACH_NODE(n, el) {
// if (std::string("wall") == n->Name()) {obstacles.push_back(parseFloorObstacleWall(n));}
// if (std::string("door") == n->Name()) {obstacles.push_back(parseFloorObstacleDoor(n));}