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:
@@ -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;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user