worked on 3d models within map

adjusted grid factory
adjusted nav mesh factory
minoor changes/fixes
new helper classes
refactoring
This commit is contained in:
2018-04-03 14:55:59 +02:00
parent f3b6155157
commit 1c2081d406
25 changed files with 620 additions and 93 deletions

View File

@@ -59,6 +59,28 @@ namespace Ray3D {
return copy;
}
/** get all triangle-edge-points (x,y) within the obstacle */
std::vector<Point2> getPoints2D() const {
std::vector<Point2> res;
for (const Triangle3& tria : triangles) {
res.push_back(tria.p1.xy());
res.push_back(tria.p2.xy());
res.push_back(tria.p3.xy());
}
return res;
}
/** get all triangle-edge-points (x,y,z) within the obstacle */
std::vector<Point3> getPoints3D() const {
std::vector<Point3> res;
for (const Triangle3& tria : triangles) {
res.push_back(tria.p1);
res.push_back(tria.p2);
res.push_back(tria.p3);
}
return res;
}
};
}