some refactoring
hopefully improved rendering speed added support to add .obj obstacles
This commit is contained in:
@@ -95,6 +95,18 @@ public:
|
||||
std::vector<Floorplan::StairPart> parts = stair->getParts();
|
||||
std::vector<Floorplan::Quad3> quads = Floorplan::getQuads(parts, floor);
|
||||
|
||||
// skip drawing?
|
||||
BBox2 bbox;
|
||||
for (const Floorplan::Quad3& q : quads) {
|
||||
bbox.add(q.p1.xy());
|
||||
bbox.add(q.p2.xy());
|
||||
bbox.add(q.p3.xy());
|
||||
bbox.add(q.p4.xy());
|
||||
}
|
||||
if (!p.isVisible(bbox)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int) parts.size(); ++i) {
|
||||
|
||||
const Floorplan::StairPart& part = parts[i];
|
||||
|
||||
Reference in New Issue
Block a user