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:
@@ -740,14 +740,11 @@ namespace NM {
|
||||
|
||||
Floorplan::Polygon2 res;
|
||||
|
||||
std::vector<Point2> src;
|
||||
Ray3D::Obstacle3D obs = Ray3D::OBJPool::get().getObject(obj->file).rotated_deg(obj->rot).translated(obj->pos);
|
||||
for (const Triangle3& tria : obs.triangles) {
|
||||
src.push_back(tria.p1.xy());
|
||||
src.push_back(tria.p2.xy());
|
||||
src.push_back(tria.p3.xy());
|
||||
}
|
||||
res.points = ConvexHull2::get(src);
|
||||
// fetch object from pool
|
||||
const Ray3D::Obstacle3D obs = Ray3D::OBJPool::get().getObject(obj->file).rotated_deg(obj->rot).translated(obj->pos);
|
||||
|
||||
// construct 2D convex hull
|
||||
res.points = ConvexHull2::get(obs.getPoints2D());
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user