focused elements always on top
indicate connected walls fixes int/float issues refactoring
This commit is contained in:
@@ -15,6 +15,8 @@ struct Material {
|
||||
|
||||
const std::vector<Material> mats = {
|
||||
|
||||
Material(255,0,0,255), // error
|
||||
|
||||
Material(0,128,0,255), // ground outdoor
|
||||
Material(64,64,64,255), // ground outdoor
|
||||
Material(105,105,105,255), // stair
|
||||
@@ -37,21 +39,23 @@ const std::vector<Material> mats = {
|
||||
|
||||
int FloorplanRendererModel::getMaterial(const Ray3D::Obstacle3D& o) const {
|
||||
|
||||
if (o.type == Ray3D::Obstacle3D::Type::GROUND_OUTDOOR) {return 0;}
|
||||
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::ERROR) {return 0;}
|
||||
|
||||
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.type == Ray3D::Obstacle3D::Type::GROUND_OUTDOOR) {return 1;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::GROUND_INDOOR) {return 2;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::STAIR) {return 3;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::HANDRAIL) {return 4;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::OBJECT) {return 12;}
|
||||
|
||||
if (o.mat == Floorplan::Material::CONCRETE) {return 6;}
|
||||
if (o.mat == Floorplan::Material::GLASS) {return 7;}
|
||||
if (o.mat == Floorplan::Material::METALLIZED_GLAS) {return 8;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR && o.mat == Floorplan::Material::GLASS) {return 5;}
|
||||
if (o.type == Ray3D::Obstacle3D::Type::DOOR) {return 6;}
|
||||
|
||||
if (o.mat == Floorplan::Material::WOOD) {return 9;}
|
||||
if (o.mat == Floorplan::Material::DRYWALL) {return 10;}
|
||||
if (o.mat == Floorplan::Material::CONCRETE) {return 7;}
|
||||
if (o.mat == Floorplan::Material::GLASS) {return 8;}
|
||||
if (o.mat == Floorplan::Material::METALLIZED_GLAS) {return 9;}
|
||||
|
||||
if (o.mat == Floorplan::Material::WOOD) {return 10;}
|
||||
if (o.mat == Floorplan::Material::DRYWALL) {return 11;}
|
||||
|
||||
return 12;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user