private static Wall parseWall(List<ReversableWay> rwList, Perspective pPerspective) { Wall wall = new Wall(); List<WallPart> wp = new ArrayList<WallPart>(); for (ReversableWay rw : rwList) { wp.add(parseWallPart(rw, pPerspective)); } wall.setWallParts(wp); return wall; }
private static WallPart getFirstWallPart(Wall w) { if (w == null) { return null; } if (w.getWallParts() != null && w.getWallParts().size() > 0) { return w.getWallParts().get(0); } return null; }
wp.setNodes(nodes); Wall w = new Wall(); w.setWallParts(Arrays.asList(wp)); w.setFacadeMaterialType("brick"); w.setRoofMaterialType("roof_tiles");
private static Color takeFacadeColor(BuildingModel buildingModel, BuildingPart bp, Wall w, WallPart wp, BuildingElementsTextureManager tm) { Color c = null; if (wp != null && wp.getFacadeColor() != null) { c = wp.getFacadeColor(); } else if (w.getFacadeColor() != null) { c = w.getFacadeColor(); } else if (bp.getFacadeColor() != null) { c = bp.getFacadeColor(); } else if (buildingModel.getFacadeColor() != null) { c = buildingModel.getFacadeColor(); } return c; }
private static Color takeRoofColor(BuildingModel buildingModel, BuildingPart bp, Wall w, WallPart wp, BuildingElementsTextureManager tm) { Color c = null; if (wp != null && wp.getRoofColor() != null) { c = wp.getRoofColor(); } else if (w.getRoofColor() != null) { c = w.getRoofColor(); } else if (bp.getRoofColor() != null) { c = bp.getRoofColor(); } else if (buildingModel.getRoofColor() != null) { c = buildingModel.getRoofColor(); } return c; }
private static TextureData takeRoofTextureData(BuildingModel buildingModel, BuildingPart bp, Wall w, BuildingElementsTextureManager tm, boolean colorable) { String mt = null; if (w.getRoofMaterialType() != null) { mt = w.getRoofMaterialType(); } else if (bp.getRoofMaterialType() != null) { mt = bp.getRoofMaterialType(); } else if (buildingModel.getRoofMaterialType() != null) { mt = buildingModel.getRoofMaterialType(); } TextureData td = tm.findTexture(new TextureFindCriteria(Type.ROOF, mt, null, null, null, colorable)); if (td == null) { td = new TextureData(null, 1, 1); } return td; }
public static TextureData takeFacadeTextureData(BuildingModel buildingModel, BuildingPart bp, Wall w, WallPart wp, BuildingElementsTextureManager tm, boolean colorable) { String mt = null; if (wp != null && wp.getFacadeMaterialType() != null) { mt = wp.getFacadeMaterialType(); } else if (w.getFacadeMaterialType() != null) { mt = w.getFacadeMaterialType(); } else if (bp.getFacadeMaterialType() != null) { mt = bp.getFacadeMaterialType(); } else if (buildingModel.getFacadeMaterialType() != null) { mt = buildingModel.getFacadeMaterialType(); } TextureData td = tm.findTexture(new TextureFindCriteria(Type.FACADE, mt, null, null, null, colorable)); if (td == null) { td = new TextureData(null, 1, 1); } return td; }
private static Wall parseWall(Way way, Perspective pPerspective) { Wall wall = new Wall(); WallPart wp = parseWallPart(new ReversableWay(way, false), pPerspective); wall.setWallParts(Arrays.asList(wp)); return wall; }
public static PolygonList2d wallToOuterPolygon(Wall wall) { return wallPartsToPolygon(wall.getWallParts()); }
private Bbox2d calcBounds(BuildingPart bp) { Bbox2d bbox = new Bbox2d(); List<WallPart> wallParts = bp.getWall().getWallParts(); for (WallPart wp : wallParts) { for (WallNode wn : wp.getNodes()) { Point2d p = wn.getPoint(); bbox.addPoint(p); } } return bbox; }
int numberOfParts = w.getWallParts().size(); WallPart wp = w.getWallParts().get(partNumber);
if (parts != null) { for (BuildingPart bp : parts) { List<WallPart> wallParts = bp.getWall().getWallParts(); for (WallPart wp : wallParts) { for (WallNode wn : wp.getNodes()) {