added support for .obj objects within the floorplan
include objects within navmesh calculation include objects within 3d mesh generation minor changes/fixes
This commit is contained in:
@@ -391,6 +391,7 @@ namespace Floorplan {
|
||||
if (std::string("line") == n->Name()) {obstacles.push_back(parseFloorObstacleLine(n));}
|
||||
if (std::string("circle") == n->Name()) {obstacles.push_back(parseFloorObstacleCircle(n));}
|
||||
if (std::string("door") == n->Name()) {obstacles.push_back(parseFloorObstacleDoor(n));}
|
||||
if (std::string("object") == n->Name()) {obstacles.push_back(parseFloorObstacleObject(n));}
|
||||
}
|
||||
return obstacles;
|
||||
}
|
||||
@@ -426,6 +427,15 @@ namespace Floorplan {
|
||||
);
|
||||
}
|
||||
|
||||
/** parse one object */
|
||||
static FloorObstacleObject* parseFloorObstacleObject(const XMLElem* el) {
|
||||
return new FloorObstacleObject(
|
||||
el->Attribute("file"),
|
||||
Point3(el->FloatAttribute("x"), el->FloatAttribute("y"), el->FloatAttribute("z")),
|
||||
Point3(el->FloatAttribute("rx"), el->FloatAttribute("ry"), el->FloatAttribute("rz"))
|
||||
);
|
||||
}
|
||||
|
||||
/** parse a floor's <outline> tag */
|
||||
static FloorOutline parseFloorOutline(const XMLElem* el) {
|
||||
FloorOutline outline;
|
||||
|
||||
Reference in New Issue
Block a user