diff --git a/noisemap-core/src/main/java/org/orbisgis/noisemap/core/FastObstructionTest.java b/noisemap-core/src/main/java/org/orbisgis/noisemap/core/FastObstructionTest.java index 2f3bde785..bfe20c9ad 100644 --- a/noisemap-core/src/main/java/org/orbisgis/noisemap/core/FastObstructionTest.java +++ b/noisemap-core/src/main/java/org/orbisgis/noisemap/core/FastObstructionTest.java @@ -483,7 +483,7 @@ public List getWideAnglePoints(double minAngle, double maxAngle) { * @return List of segment */ public LinkedList getLimitsInRange(double maxDist, - Coordinate p1) { + Coordinate p1, boolean goThroughWalls) { LinkedList walls = new LinkedList<>(); int curTri = getTriangleIdByCoordinate(p1); int nextTri = -1; @@ -526,7 +526,7 @@ public LinkedList getLimitsInRange(double maxDist, if (wall.getBuildingId() >= 1) { walls.add(wall); } - if(!navigationHistory.contains(neighbors.get(sideId))) { + if((goThroughWalls || wall.getBuildingId() < 1) && !navigationHistory.contains(neighbors.get(sideId))) { // Store currentTriangle Id. This is where to go // back when there is no more navigable neighbors at // the next triangle diff --git a/noisemap-core/src/main/java/org/orbisgis/noisemap/core/PropagationProcess.java b/noisemap-core/src/main/java/org/orbisgis/noisemap/core/PropagationProcess.java index 79c0d406b..4a599b82b 100644 --- a/noisemap-core/src/main/java/org/orbisgis/noisemap/core/PropagationProcess.java +++ b/noisemap-core/src/main/java/org/orbisgis/noisemap/core/PropagationProcess.java @@ -141,7 +141,7 @@ private void feedMirroredReceiverResults( //Counter ClockWise test. Walls vertices are CCW oriented. //This help to test if a wall could see a point or another wall //If the triangle formed by two point of the wall + the receiver is CCW then the wall is oriented toward the point. - boolean isCCW = false; + boolean isCCW; if (lastResult == -1) { //If the receiverCoord is not an image isCCW = wallPointTest(wall, receiverCoord); } else { @@ -981,10 +981,8 @@ public void computeSoundLevelAtPosition(Coordinate receiverCoord, double energet double srcEnergeticSum = BASE_LVL; //Global energetic sum of all sources processed List nearBuildingsWalls = null; if (data.reflexionOrder > 0) { - nearBuildingsWalls = new ArrayList<>( - data.freeFieldFinder.getLimitsInRange( - data.maxSrcDist, receiverCoord) - ); + nearBuildingsWalls = new ArrayList<>(data.freeFieldFinder.getLimitsInRange( + data.maxSrcDist, receiverCoord, false)); } // Source search by multiple range query HashSet processedLineSources = new HashSet(); //Already processed Raw source (line and/or points)