private static void buildFloor(BuildingPart bp, BuildingModel buildingModel, ModelFactory mf, BuildingElementsTextureManager tm, TextureData roofTextureData, Color facadeColor, double minHeight) { Color floorColor = takeFloorColor(buildingModel, bp, tm); TextureData floorTD = takeFloorTextureData(buildingModel, bp, tm, floorColor != null); String tex0Key = floorTD.getTex0(); Material mat = MaterialFactory.createTextureColorMaterial(tex0Key, floorColor); MeshFactory mesh = mf.addMesh("FloorPart"); mesh.hasTexture = true; mesh.materialID = mf.cacheMaterial(mat); PolygonWithHolesList2d buildingPolygon = BuildingUtil.buildingPartToPolygonWithHoles(bp); MeshFactoryUtil.addPolygonWithHolesInYRevert(buildingPolygon, minHeight, mesh, roofTextureData, 0, 0, new Vector3d(1, 0, 0)); }