fixed typo in normal, added gt point 3d
This commit is contained in:
@@ -251,9 +251,9 @@ namespace Floorplan {
|
||||
/** a GroundTruthPoint located somewhere on a floor */
|
||||
struct GroundTruthPoint {
|
||||
int id; //TODO: this value can be changed and isn't set incremental within the indoormap
|
||||
Point2 pos;
|
||||
Point3 pos;
|
||||
GroundTruthPoint() : id(), pos() {;}
|
||||
GroundTruthPoint(const int& id, const Point2& pos) : id(id), pos(pos) {;}
|
||||
GroundTruthPoint(const int& id, const Point3& pos) : id(id), pos(pos) {;}
|
||||
bool operator == (const GroundTruthPoint& o) const {return (o.id == id) && (o.pos == pos);}
|
||||
};
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ 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;
|
||||
}
|
||||
@@ -198,22 +198,22 @@ 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 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 = parsePoint2(el);
|
||||
return gtp;
|
||||
}
|
||||
/** 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 */
|
||||
|
||||
@@ -146,15 +146,16 @@ namespace Floorplan {
|
||||
}
|
||||
floor->InsertEndChild(pois);
|
||||
|
||||
XMLElem* gtpoints = doc.NewElement("gtpoints");
|
||||
for (const GroundTruthPoint* gtp : mf->gtpoints) {
|
||||
XMLElem* elem = doc.NewElement("gtpoint");
|
||||
elem->SetAttribute("id", gtp->id);
|
||||
elem->SetAttribute("x", gtp->pos.x);
|
||||
elem->SetAttribute("y", gtp->pos.y);
|
||||
gtpoints->InsertEndChild(elem);
|
||||
}
|
||||
floor->InsertEndChild(gtpoints);
|
||||
XMLElem* gtpoints = doc.NewElement("gtpoints");
|
||||
for (const GroundTruthPoint* gtp : mf->gtpoints) {
|
||||
XMLElem* elem = doc.NewElement("gtpoint");
|
||||
elem->SetAttribute("id", gtp->id);
|
||||
elem->SetAttribute("x", gtp->pos.x);
|
||||
elem->SetAttribute("y", gtp->pos.y);
|
||||
elem->SetAttribute("z", gtp->pos.z);
|
||||
gtpoints->InsertEndChild(elem);
|
||||
}
|
||||
floor->InsertEndChild(gtpoints);
|
||||
|
||||
XMLElem* accesspoints = doc.NewElement("accesspoints");
|
||||
for (const AccessPoint* ap : mf->accesspoints) {
|
||||
|
||||
Reference in New Issue
Block a user