25 const std::string& defaultValue)
27 std::ifstream file(filePath);
33 const std::string keyExtended = key +
"=";
36 while (std::getline(file, line))
38 if (line.compare(0, keyExtended.size(), keyExtended) == 0)
40 std::string value{line.substr(keyExtended.size())};
55 const std::string value =
59 return static_cast<unsigned int>(std::stoul(value));
69 const std::string value =
73 return static_cast<double>(std::stod(value));
82 double seuilConfondus)
89 const double ux = B.
_x - A.
_x;
90 const double uy = B.
_y - A.
_y;
91 const double uz = B.
_z - A.
_z;
93 const double vx = D.
_x - C.
_x;
94 const double vy = D.
_y - C.
_y;
95 const double vz = D.
_z - C.
_z;
98 const double nx = uy * vz - uz * vy;
99 const double ny = uz * vx - ux * vz;
100 const double nz = ux * vy - uy * vx;
102 const double anx = std::abs(nx);
103 const double any = std::abs(ny);
104 const double anz = std::abs(nz);
113 double a1, a2, u1, u2, c1, c2, v1, v2;
115 if ((anx >= any) && (anx >= anz))
127 else if ((any >= anx) && (any >= anz))
152 const double w1 = c1 - a1;
153 const double w2 = c2 - a2;
155 const double det = u1 * v2 - u2 * v1;
163 const double t = (w1 * v2 - w2 * v1) / det;
164 const double s = (w1 * u2 - w2 * u1) / det;
166 const double lenU = std::sqrt(ux * ux + uy * uy + uz * uz);
167 const double lenV = std::sqrt(vx * vx + vy * vy + vz * vz);
168 const double paramTol = seuilConfondus / std::max(1.0, std::max(lenU, lenV));
170 if ((t < -paramTol) || (t > 1.0 + paramTol) || (
s < -paramTol) || (
s > 1.0 + paramTol))
175 pt.
_x = A.
_x + t * ux;
176 pt.
_y = A.
_y + t * uy;
177 pt.
_z = A.
_z + t * uz;
194 const std::string solverConfigPath =
"C:\\projects\\tympan_tools\\17534-3\\solver_conf.txt";
195 const std::string reflectionMethod =
197 if (reflectionMethod.compare(
"RAY_TRACING") == 0)
200 solverConfigPath, 200);
202 solverConfigPath, 2.);
208 const bool enableVisibilityPruning = config->EnableVisibilityPruning;
209 if (enableVisibilityPruning)
223 zmin = zmin.
div(C3 * C2);
228 const double d_SR,
const double d,
const double z,
248 const double dMax = std::max(d_SS, d_SR);
249 const double dMin =
std::min(d_SS, d_SR);
250 const double numerator = (dMax + e) * dMin * d;
252 for (std::size_t i = 0; i < TY_SPECTRE_OCT_NB_ELMT; ++i)
256 kMeteo[i] = std::exp(-(1.0 / 2000.0) * std::sqrt(numerator / (2.0 * (z - zMin[i]))));
278 for (std::size_t i = 0; i < TY_SPECTRE_OCT_NB_ELMT; ++i)
282 const double term = 2.0 + (C2 / lambda[i]) * c3[i] * z;
283 dz[i] = 10.0 * std::log10(1.0 + term * kmeteo[i]);
294 double distance)
const
298 const size_t multipleReflectionOrder = config->ReflectionOrder;
300 if (multipleReflectionOrder == 0)
308 std::unique_ptr<TYAbstractReflectionPathFinder> pReflectionPathFinderInstance =
311 pReflectionPathFinderInstance->setup(multipleReflectionOrder, tabIntersect, ray.
_ptA, ray.
_ptB);
313 while (pReflectionPathFinderInstance->remainingPaths())
319 std::deque<OPoint3D> imageSourcesList;
322 imageSourcesList.emplace_back();
335 TabChemins, distance);
340 size_t multipleReflectionOrder,
const std::deque<TYSIntersection>& tabIntersect,
const OSegment3D& ray,
343 std::vector<ReflectingSegmentCache> reflectingSegments;
344 reflectingSegments.reserve(tabIntersect.size());
348 for (
const auto& inter : tabIntersect)
350 if (inter.isInfra && inter.bIntersect[1])
356 if (reflectingSegments.empty())
361 std::vector<const TYSIntersection*> currentCombination;
362 currentCombination.reserve(multipleReflectionOrder);
364 std::deque<OPoint3D> currentImageSources;
365 currentImageSources.push_back(ray.
_ptA);
371 currentImageSources, tabIntersect, ray, source, TabChemins, distance);
375 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
376 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double hr,
double& Gs,
double& Gm,
double& Gr)
const
401 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
402 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double& Gs)
const
404 double heightRatio = 30.0;
407 if (pathPoints2D.size() < 2)
412 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
417 const double srcZoneLength = heightRatio * hs;
426 double traversedLength = 0.0;
427 double coveredLength = 0.0;
428 double weightedGroundSum = 0.0;
430 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
432 const OPoint3D& ptA = pathPoints2D[i];
433 const OPoint3D& ptB = pathPoints2D[i + 1];
436 const double currentSegmentLength = currentSegment.
longueur();
443 const double remainingLength = srcZoneLength - traversedLength;
453 if (remainingLength < currentSegmentLength)
455 const double alpha = remainingLength / currentSegmentLength;
457 ptEndZone.
_x = ptA.
_x + alpha * (ptB.
_x - ptA.
_x);
458 ptEndZone.
_y = ptA.
_y + alpha * (ptB.
_y - ptA.
_y);
459 ptEndZone.
_z = ptA.
_z + alpha * (ptB.
_z - ptA.
_z);
461 double GCurSeg = 0.0;
462 double dpCurSeg = 0.0;
463 computeGZone(ptA, ptEndZone, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
465 weightedGroundSum += GCurSeg;
466 coveredLength += dpCurSeg;
467 traversedLength = srcZoneLength;
473 double GCurSeg = 0.0;
474 double dpCurSeg = 0.0;
475 computeGZone(ptA, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
477 weightedGroundSum += GCurSeg;
478 coveredLength += dpCurSeg;
479 traversedLength += currentSegmentLength;
484 Gs = weightedGroundSum / coveredLength;
495 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
496 const std::deque<OPoint3D>& pathPoints2D,
double hr,
double& Gr)
const
498 double heightRatio = 30.0;
501 if (pathPoints2D.size() < 2)
506 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
511 const double rcpZoneLength = heightRatio * hr;
520 double traversedLength = 0.0;
521 double coveredLength = 0.0;
522 double weightedGroundSum = 0.0;
524 for (
size_t i = pathPoints2D.size() - 1; i > 0; --i)
526 const OPoint3D& ptA = pathPoints2D[i - 1];
527 const OPoint3D& ptB = pathPoints2D[i];
530 const double currentSegmentLength = currentSegment.
longueur();
537 const double remainingLength = rcpZoneLength - traversedLength;
545 if (remainingLength < currentSegmentLength)
547 const double alpha = remainingLength / currentSegmentLength;
552 ptStartZone.
_x = ptB.
_x + alpha * (ptA.
_x - ptB.
_x);
553 ptStartZone.
_y = ptB.
_y + alpha * (ptA.
_y - ptB.
_y);
554 ptStartZone.
_z = ptB.
_z + alpha * (ptA.
_z - ptB.
_z);
556 double GCurSeg = 0.0;
557 double dpCurSeg = 0.0;
558 computeGZone(ptStartZone, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i - 1]);
560 weightedGroundSum += GCurSeg;
561 coveredLength += dpCurSeg;
562 traversedLength = rcpZoneLength;
568 double GCurSeg = 0.0;
569 double dpCurSeg = 0.0;
570 computeGZone(ptA, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i - 1]);
572 weightedGroundSum += GCurSeg;
573 coveredLength += dpCurSeg;
574 traversedLength += currentSegmentLength;
579 Gr = weightedGroundSum / coveredLength;
590 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
591 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double hr,
double& Gm)
const
593 double heightRatio = 30.0;
596 if (pathPoints2D.size() < 2)
601 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
606 const double srcZoneLength = heightRatio * hs;
607 const double rcpZoneLength = heightRatio * hr;
611 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
623 const double middleZoneBegin = srcZoneLength;
624 const double middleZoneEnd = dp - rcpZoneLength;
626 double traversedLength = 0.0;
627 double coveredLength = 0.0;
628 double weightedGroundSum = 0.0;
630 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
632 const OPoint3D& ptA = pathPoints2D[i];
633 const OPoint3D& ptB = pathPoints2D[i + 1];
636 const double currentSegmentLength = currentSegment.
longueur();
643 const double segmentBegin = traversedLength;
644 const double segmentEnd = traversedLength + currentSegmentLength;
647 const double overlapBegin = std::max(segmentBegin, middleZoneBegin);
648 const double overlapEnd =
std::min(segmentEnd, middleZoneEnd);
652 const double alphaBegin = (overlapBegin - segmentBegin) / currentSegmentLength;
653 const double alphaEnd = (overlapEnd - segmentBegin) / currentSegmentLength;
656 ptZoneBegin.
_x = ptA.
_x + alphaBegin * (ptB.
_x - ptA.
_x);
657 ptZoneBegin.
_y = ptA.
_y + alphaBegin * (ptB.
_y - ptA.
_y);
658 ptZoneBegin.
_z = ptA.
_z + alphaBegin * (ptB.
_z - ptA.
_z);
661 ptZoneEnd.
_x = ptA.
_x + alphaEnd * (ptB.
_x - ptA.
_x);
662 ptZoneEnd._y = ptA.
_y + alphaEnd * (ptB.
_y - ptA.
_y);
663 ptZoneEnd._z = ptA.
_z + alphaEnd * (ptB.
_z - ptA.
_z);
665 double GCurSeg = 0.0;
666 double dpCurSeg = 0.0;
667 computeGZone(ptZoneBegin, ptZoneEnd, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
669 weightedGroundSum += GCurSeg;
670 coveredLength += dpCurSeg;
673 traversedLength = segmentEnd;
678 Gm = weightedGroundSum / coveredLength;
694 const bool sameOrder = (seg1.
_ptA == seg2.
_ptA) && (seg1.
_ptB == seg2.
_ptB);
696 const bool reverseOrder = (seg1.
_ptA == seg2.
_ptB) && (seg1.
_ptB == seg2.
_ptA);
698 return sameOrder || reverseOrder;
702 const std::vector<const TYSIntersection*>& currentCombination,
703 const std::deque<OPoint3D>& imageSourcesList,
const OPoint3D& receptorPoint,
704 std::deque<OPoint3D>& reflectionPointsList)
const
706 reflectionPointsList.clear();
708 if (currentCombination.empty())
716 if (imageSourcesList.size() != currentCombination.size() + 1)
726 for (
int i =
static_cast<int>(currentCombination.size()) - 1; i >= 0; --i)
728 const OPoint3D& currentImageSource = imageSourcesList[i + 1];
729 const OSegment3D& currentBarrier = currentCombination[i]->segInter[1];
737 reflectionPointsList.clear();
741 reflectionPointsList.push_front(currentReflectionPoint);
742 nextPoint = currentReflectionPoint;
749 const std::vector<const TYSIntersection*>& barrierCombination,
750 const std::deque<OPoint3D>& reflectionPointsList,
const std::deque<TYSIntersection>& tabIntersect,
753 const size_t reflectionOrder = barrierCombination.size();
755 if (reflectionPointsList.size() != reflectionOrder)
760 std::deque<OPoint3D> pathPoints;
761 pathPoints.push_back(sourcePoint);
762 for (
const auto& point : reflectionPointsList)
764 pathPoints.push_back(point);
766 pathPoints.push_back(receptorPoint);
770 for (
size_t i = 0; i <= reflectionOrder; ++i)
772 const OSegment3D pathSegment(pathPoints[i], pathPoints[i + 1]);
774 for (
const auto& sceneBarrier : tabIntersect)
787 if (sceneBarrier.segInter[1].intersects(pathSegment, intersectionPoint,
TYSEUILCONFONDUS))
798 const std::vector<const TYSIntersection*>& barrierCombination,
799 const std::deque<OPoint3D>& imageSourcesList,
const std::deque<OPoint3D>& reflectionPointsList,
801 double distance)
const
803 const size_t reflectionOrder = barrierCombination.size();
805 if (reflectionOrder == 0)
810 if (imageSourcesList.size() != reflectionOrder + 1)
815 if (reflectionPointsList.size() != reflectionOrder)
824 std::deque<OPoint3D> pathPoints;
825 std::deque<OPoint3D> pathPoints2D;
826 std::deque<double> sourceReflectionPointLengths;
827 std::deque<double> reflectionPointReceptorLengths;
829 pathPoints.push_back(directRay.
_ptA);
831 for (
const auto& point : reflectionPointsList)
833 pathPoints.push_back(point);
836 pathPoints.push_back(directRay.
_ptB);
839 double pathLength = 0.0;
844 double segLength = 0.0;
846 for (
size_t i = 0; i + 1 < pathPoints.size(); ++i)
849 segLength =
segment.longueur();
850 pathLength += segLength;
851 if (i < pathPoints.size() - 2)
853 sourceReflectionPointLengths.push_back(pathLength);
854 reflectionPointReceptorLengths.push_back(-pathLength);
861 pathPoints2D.push_back(A2D);
863 pathPoints2D.push_back(B2D);
865 for (
size_t i = 0; i < reflectionOrder; ++i)
867 reflectionPointReceptorLengths[i] += pathLength;
872 etape.
_pt = pathPoints[0];
875 const OSegment3D firstLeg(pathPoints[0], pathPoints[1]);
879 tabEtapes.push_back(etape);
882 for (
size_t i = 0; i < reflectionOrder; ++i)
887 if (material ==
nullptr)
892 if (!barrierCombination[i]->pFaceGeomData)
898 etape.
_pt = reflectionPointsList[i];
902 tabEtapes.push_back(etape);
908 double hs{0.0}, hr{0.0};
911 double Gs{0.0}, Gm{0.0}, Gr{0.0};
915 std::deque<std::deque<TYSIntersection>> tabIntersectSegments;
917 tabIntersectSegments.resize(reflectionOrder + 1);
918 for (
size_t i = 0; i < reflectionOrder + 1; ++i)
920 seg =
OSegment3D{pathPoints[i], pathPoints[i + 1]};
926 std::unique_ptr<TYChemin9613Solver> chemin =
createChemin();
928 chemin->setLongueur(pathLength);
929 chemin->setDistance(distance);
930 chemin->calcAttenuation(tabEtapes, *
_pSolverAtmos, dp, hs, hr, Gs, Gm, Gr);
935 for (
size_t i = 0; i < reflectionOrder; ++i)
937 const OPoint3D& Oprev = pathPoints[i];
938 const OPoint3D& O = pathPoints[i + 1];
940 const double a = barrierCombination[i]->pFaceGeomData->a;
941 const double h = barrierCombination[i]->pFaceGeomData->h;
942 const OVector3D& normal = barrierCombination[i]->pFaceGeomData->n;
943 double d_SO = sourceReflectionPointLengths[i];
944 double d_OR = reflectionPointReceptorLengths[i];
945 curFilter = chemin->calcMinimalExtensionConditionOneReflection(Oprev, O, d_SO, d_OR, a, h, normal);
946 filter = filter * curFilter;
947 chemin->setMinimalExtensionConditionReflection(filter);
953 bool reflectionOnCylinder =
false;
958 reflectionOnCylinder =
true;
961 if (reflectionOnCylinder)
963 if (reflectionOrder == 1)
965 boost::shared_ptr<tympan::AcousticFaceGeomDataCylinder> pFaceGeomDataCylinder =
968 barrierCombination[0]->pFaceGeomData);
972 const OPoint3D& M{pFaceGeomDataCylinder->M};
973 const double r{pFaceGeomDataCylinder->r};
974 const OVector3D& axis{pFaceGeomDataCylinder->axis};
975 chemin->calcCylinderReflectionAttenuation(S, R, P, M, r, axis);
983 TabChemins.push_back(*chemin);
1006 const double norm2 = cache.
ux * cache.
ux + cache.
uy * cache.
uy + cache.
uz * cache.
uz;
1033 const double apx = inputPoint.
_x - cache.
ax;
1034 const double apy = inputPoint.
_y - cache.
ay;
1035 const double apz = inputPoint.
_z - cache.
az;
1037 const double t = (apx * cache.
ux + apy * cache.
uy + apz * cache.
uz) * cache.
invNorm2;
1039 const double hx = cache.
ax + t * cache.
ux;
1040 const double hy = cache.
ay + t * cache.
uy;
1041 const double hz = cache.
az + t * cache.
uz;
1044 reflectedPoint.
_x = 2.0 * hx - inputPoint.
_x;
1045 reflectedPoint.
_y = 2.0 * hy - inputPoint.
_y;
1046 reflectedPoint.
_z = 2.0 * hz - inputPoint.
_z;
1050 size_t reflectionOrder,
const std::vector<ReflectingSegmentCache>& reflectingSegments,
1051 std::vector<const TYSIntersection*>& currentCombination, std::deque<OPoint3D>& currentImageSources,
1052 const std::deque<TYSIntersection>& tabIntersect,
const OSegment3D& ray,
1055 if (currentCombination.size() == reflectionOrder)
1060 const OPoint3D& previousImageSource = currentImageSources.back();
1063 std::unique_ptr<TYAbstractReflectionPruningStrategy> pPruningStrategyInstance =
1065 pPruningStrategyInstance->initialize(currentCombination, currentImageSources);
1067 for (
const auto&
segment : reflectingSegments)
1070 if (!currentCombination.empty() && currentCombination.back() ==
segment.barrier)
1076 if (pPruningStrategyInstance->pruningCriterionMet(*
segment.barrier))
1084 currentCombination.push_back(
segment.barrier);
1085 currentImageSources.push_back(nextImageSource);
1090 TabChemins, distance);
1093 currentImageSources, tabIntersect, ray, source, TabChemins, distance);
1095 currentImageSources.pop_back();
1096 currentCombination.pop_back();
1101 const std::vector<const TYSIntersection*>& currentCombination,
1102 const std::deque<OPoint3D>& imageSourcesList,
const std::deque<TYSIntersection>& tabIntersect,
1104 double distance)
const
1106 std::deque<OPoint3D> reflectionPointsList;
1123 return buildReflectionPath(currentCombination, imageSourcesList, reflectionPointsList, ray, source,
1124 TabChemins, distance);
#define INTERS_NULLE
No intersection.
std::pair< unsigned int, unsigned int > segment
std::deque< TYChemin9613Solver > TYTabChemin9613Solver
TYChemin collection.
std::deque< TYEtape9613Solver > TYTabEtape9613Solver
TYEtape collection.
double _y
y coordinate of OCoord3D
double _z
z coordinate of OCoord3D
double _x
x coordinate of OCoord3D
Class to define a segment.
virtual double longueur() const
Return the segment length.
virtual int symetrieOf(const OPoint3D &pt, OPoint3D &ptSym) const
Return the symmetrical of a point.
OPoint3D _ptA
Point A of the segment.
virtual int intersects(const OSegment3D &seg, OPoint3D &pt, double seuilConfondus) const
Return the intersection point with another segment.
OPoint3D _ptB
Point B of the segment.
OSpectreAbstract & div(const OSpectreAbstract &spectre) const
Division of two spectrums.
double * getTabValReel() override
Get an array of the real values of the spectrum.
TYAcousticModel9613Solver2024(TYSolver9613Solver2024 &solver)
bool validateReflectionCandidate(const std::vector< const TYSIntersection * > &barrierCombination, const std::deque< OPoint3D > &reflectionPointsList, const std::deque< TYSIntersection > &tabIntersect, const OPoint3D &sourcePoint, const OPoint3D &receptorPoint) const
Validate a reflection candidate against the reflecting segments of the scene. A reflection candidate ...
bool computeGroundFactorMiddleZone(const std::deque< std::deque< TYSIntersection >> &tabIntersectSegments, const std::deque< OPoint3D > &pathPoints2D, double hs, double hr, double &Gm) const
Compute the ground factor of the middle zone for a reflected path.
std::unique_ptr< TYChemin9613Solver > createChemin() const override
bool sameReflectingSegment(const TYSIntersection &lhs, const TYSIntersection &rhs) const
Check whether two reflecting segments are identical in plane EL.
ReflectingSegmentCache makeReflectingSegmentCache(const TYSIntersection &inter) const
Build the geometric cache associated with one reflecting segment.
void buildReflectionPathsStreaming(size_t reflectionOrder, const std::vector< ReflectingSegmentCache > &reflectingSegments, std::vector< const TYSIntersection * > ¤tCombination, std::deque< OPoint3D > ¤tImageSources, const std::deque< TYSIntersection > &tabIntersect, const OSegment3D &ray, const tympan::AcousticSource &source, TYTabChemin9613Solver &TabChemins, double distance) const
Recursively build and validate reflection paths in streaming mode.
OSpectreOctave calculZMin(const double C2, const OSpectreOctave &C3) const override
Compute zmin, the min value of z for which the barrier attenuation Dz is null. This minimum distance ...
void computeCheminReflexion(const std::deque< TYSIntersection > &tabIntersect, const OSegment3D &ray, const tympan::AcousticSource &source, TYTabChemin9613Solver &TabChemins, double distance) const override
Compute the list of path generated by reflection on the vertical walls.
void reflectPointAboutCachedLine(const ReflectingSegmentCache &cache, const OPoint3D &inputPoint, OPoint3D &reflectedPoint) const
Reflect a point about the support line stored in a reflecting segment cache.
bool getGroundfactors(const std::deque< std::deque< TYSIntersection >> &tabIntersectSegments, const std::deque< OPoint3D > &pathPoints2D, double hs, double hr, double &Gs, double &Gm, double &Gr) const
Get ground factors for source, middle and receptor zones for a reflected path.
bool computeGroundFactorReceiverZone(const std::deque< std::deque< TYSIntersection >> &tabIntersectSegments, const std::deque< OPoint3D > &pathPoints2D, double hr, double &Gr) const
Compute the ground factor of the receptor zone for a reflected path.
bool computeGroundFactorSourceZone(const std::deque< std::deque< TYSIntersection >> &tabIntersectSegments, const std::deque< OPoint3D > &pathPoints2D, double hs, double &Gs) const
Compute the ground factor of the source zone for a reflected path.
bool buildReflectionPathForCombination(const std::vector< const TYSIntersection * > ¤tCombination, const std::deque< OPoint3D > &imageSourcesList, const std::deque< TYSIntersection > &tabIntersect, const OSegment3D &ray, const tympan::AcousticSource &source, TYTabChemin9613Solver &TabChemins, double distance) const
Build a reflection path from the current reflecting segment combination.
void init() override
Initialize the acoustic model.
OSpectreOctave calculDz(const double z, const double C2, const OSpectreOctave &C3, const OSpectreOctave &Kmeteo, const OSpectreOctave &zmin) const override
Compute Dz, the barrier attenuation for each octave band in dB.
bool buildReflectionPath(const std::vector< const TYSIntersection * > &barrierCombination, const std::deque< OPoint3D > &imageSourcesList, const std::deque< OPoint3D > &reflectionPointsList, const OSegment3D &directRay, const tympan::AcousticSource &source, TYTabChemin9613Solver &TabChemins, double distance) const
Build a reflection path from a valid reflecting segment combination.
bool buildReflectionPoints(const std::vector< const TYSIntersection * > ¤tCombination, const std::deque< OPoint3D > &imageSourcesList, const OPoint3D &receptorPoint, std::deque< OPoint3D > &reflectionPointsList) const
Build the list of reflection points associated with a reflecting segment combination.
std::unique_ptr< TYAbstractReflectionPruningStrategy > _pReflectionPruningStrategy
OSpectreOctave calculKmeteo(const bool vertical, const double d_SS, const double d_SR, const double d, const double z, const double e, const OSpectreOctave &z_min) const override
Compute Kmeteo, the correction factor for meteorological effects.
std::unique_ptr< TYAbstractReflectionPathFinder > _pReflectionPathFinder
void computeCheminReflectionImageSourceMethod(size_t multipleReflectionOrder, const std::deque< TYSIntersection > &tabIntersect, const OSegment3D &ray, const tympan::AcousticSource &source, TYTabChemin9613Solver &TabChemins, double distance) const
Compute the list of paths generated by multiple reflections in EL-plane using the Image Source Method...
Acoustic model for the 9613Solver.
virtual void init() override
Initialize the acoustic model.
TYSolver9613Solver & _solver
Reference to the solver.
bool computeGZone(const OPoint3D &ptDebut, const OPoint3D &ptFin, double &GZone, double &dpZone, const std::deque< TYSIntersection > &tabIntersect) const
Compute GZone and dpZone for the segment between ptDebut and ptFin.
bool computeSegmentEdgesHeights(double &hauteurA, double &hauteurB, const OSegment3D &meanSlope, const OSegment3D &ray) const
Compute heights relative to real ground, of the edges of a segment.
std::unique_ptr< AtmosphericConditions > _pSolverAtmos
void meanSlope(const OSegment3D &director, OSegment3D &slope) const
Create a segment corresponding to the projection of "director" segment on the ground.
OSpectreOctave _Absorption
absorption Spectrum
OPoint3D _pt
The starting point of this step.
ACOUSTIC_EVENT_TYPES _type
Acoustic event type.
void selectFaces(std::deque< TYSIntersection > &tabIntersect, const OSegment3D &rayon, const string &sourceVolumeId)
Delegate to _faceSelector the build of the array of intersections.
Describes building material.
ComplexSpectrum spectrum
Spectrum to store acoustic values at different frequencies.
Describes an acoustic source.
string volume_id
Volume id.
SourceDirectivityInterface * directivity
Pointer to the source directivity.
static LPSolverConfiguration get()
Get the configuration.
virtual Spectrum lwAdjustment(Vector direction, double distance)=0
< Pure virtual method to return directivity of the Source
std::string readValueFromConfig(const std::string &filePath, const std::string &key, const std::string &defaultValue)
unsigned int readRaytracingNbRaysFromConfig(const std::string &filePath, unsigned int defaultValue)
bool intersectSegmentsFastInTheirPlane(const OSegment3D &segA, const OSegment3D &segB, OPoint3D &pt, double seuilConfondus)
double readRaytracingRcptRadiusFromConfig(const std::string &filePath, double defaultValue)
std::string readReflectionMethodFromConfig(const std::string &filePath, std::string defaultValue)
boost::shared_ptr< SolverConfiguration > LPSolverConfiguration
Cache geometry associated with one reflecting segment.
const TYSIntersection * barrier
Data-structure representing a reflection path It stores all needed data to build a TYChemin.
std::deque< OPoint3D > reflectionPoints
std::vector< const TYSIntersection * > reflectingSegments
Data structure for intersections.
Data structure to store geometrical data of the surface from which comes a triangle issued from a cyl...
Data structure to store geometrical data of the surface from which comes a triangle.