added support for pillars
minor fixes new 3D models
This commit is contained in:
@@ -113,12 +113,13 @@ MapView3D::MapView3D(QWidget *parent) : QOpenGLWidget(parent) {
|
||||
|
||||
auto format = QSurfaceFormat();
|
||||
format.setRenderableType(QSurfaceFormat::OpenGL);
|
||||
format.setVersion(3, 4);
|
||||
//format.setVersion(3, 4);
|
||||
//format.setSamples(2);
|
||||
//format.setProfile(QSurfaceFormat::CompatibilityProfile);
|
||||
//format.setOption(QSurfaceFormat::DebugContext);
|
||||
format.setSamples(2);
|
||||
format.setProfile(QSurfaceFormat::CompatibilityProfile);
|
||||
format.setOption(QSurfaceFormat::DebugContext);
|
||||
|
||||
setFormat(format);
|
||||
setFormat(format);
|
||||
|
||||
auto ver = format.version();
|
||||
std::cout << "OpenGL Context Version: " << ver.first << "." << ver.second << std::endl;
|
||||
|
||||
@@ -38,11 +38,14 @@ private:
|
||||
Material(140,140,140,255), // door (wood)
|
||||
|
||||
Material(128,128,128,255), // concrete
|
||||
Material(200,200,255,96), // glass
|
||||
Material(240,240,255,96), // glass
|
||||
Material(170,170,255,96), // glass (metallized)
|
||||
Material(170,120,60,255), // wood
|
||||
Material(200,200,200,255), // drywall
|
||||
|
||||
Material(255,255,255,255), // default
|
||||
Material(255,255,255,255), // object
|
||||
|
||||
Material(235,235,235,255), // default
|
||||
|
||||
};
|
||||
|
||||
@@ -52,16 +55,19 @@ private:
|
||||
if (o.type == Ray3D::Obstacle3D::Type::GROUND_INDOOR) {return 1;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::STAIR) {return 2;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::HANDRAIL) {return 3;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::OBJECT) {return 11;}
|
||||
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR && o.mat == Floorplan::Material::GLASS) {return 4;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR) {return 5;}
|
||||
|
||||
if (o.mat == Floorplan::Material::CONCRETE) {return 6;}
|
||||
if (o.mat == Floorplan::Material::GLASS) {return 7;}
|
||||
if (o.mat == Floorplan::Material::WOOD) {return 8;}
|
||||
if (o.mat == Floorplan::Material::DRYWALL) {return 9;}
|
||||
if (o.mat == Floorplan::Material::METALLIZED_GLAS) {return 8;}
|
||||
|
||||
return 10;
|
||||
if (o.mat == Floorplan::Material::WOOD) {return 9;}
|
||||
if (o.mat == Floorplan::Material::DRYWALL) {return 10;}
|
||||
|
||||
return 12;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ QNavMeshSettings::QNavMeshSettings(NM::NavMeshSettings* settings, QWidget* paren
|
||||
lay->addWidget(new QLabel("min region size"), row, 0);
|
||||
QLabel* lblMinRegionSize = new QLabel("");
|
||||
lay->addWidget(lblMinRegionSize, row, 2);
|
||||
QSlider* sldRegionMinSize = new QSlider(Qt::Orientation::Horizontal); sldRegionMinSize->setMinimum(400); sldRegionMinSize->setMaximum(10000);
|
||||
QSlider* sldRegionMinSize = new QSlider(Qt::Orientation::Horizontal); sldRegionMinSize->setMinimum(400); sldRegionMinSize->setMaximum(99900);
|
||||
connect(sldRegionMinSize, &QSlider::valueChanged, [settings, sldRegionMinSize, lblMinRegionSize] () {
|
||||
settings->regionMinSize = sldRegionMinSize->value() / 100.0f;
|
||||
lblMinRegionSize->setText(QString("%1 m").arg(settings->regionMinSize, 5, 'f', 2, 0));
|
||||
|
||||
Reference in New Issue
Block a user