improved 3d rendering, minor changes
added support for thick 3d walls
This commit is contained in:
@@ -212,8 +212,21 @@ void MapView3D::draw() {
|
||||
|
||||
} else {
|
||||
|
||||
std::vector<MapModelElement*> elements = getModel()->getVisibleElements();
|
||||
|
||||
// order: transparent last
|
||||
auto func = [] (const MapModelElement* e1, const MapModelElement* e2) {
|
||||
if (e1->getMV3D() == nullptr) {return false;}
|
||||
if (e2->getMV3D() == nullptr) {return true;}
|
||||
const bool e1t = e1->getMV3D()->isTransparent();
|
||||
const bool e2t = e2->getMV3D()->isTransparent();
|
||||
return e1t < e2t;
|
||||
};
|
||||
|
||||
std::sort(elements.begin(), elements.end(), func);
|
||||
|
||||
// show floorplan
|
||||
for (MapModelElement* el : getModel()->getVisibleElements()) {
|
||||
for (MapModelElement* el : elements) {
|
||||
if (el->getMV3D()) {el->getMV3D()->paintGL();}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user