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));
68 double seuilConfondus)
75 const double ux = B.
_x - A.
_x;
76 const double uy = B.
_y - A.
_y;
77 const double uz = B.
_z - A.
_z;
79 const double vx = D.
_x - C.
_x;
80 const double vy = D.
_y - C.
_y;
81 const double vz = D.
_z - C.
_z;
84 const double nx = uy * vz - uz * vy;
85 const double ny = uz * vx - ux * vz;
86 const double nz = ux * vy - uy * vx;
88 const double anx = std::abs(nx);
89 const double any = std::abs(ny);
90 const double anz = std::abs(nz);
99 double a1, a2, u1, u2, c1, c2, v1, v2;
101 if ((anx >= any) && (anx >= anz))
113 else if ((any >= anx) && (any >= anz))
138 const double w1 = c1 - a1;
139 const double w2 = c2 - a2;
141 const double det = u1 * v2 - u2 * v1;
149 const double t = (w1 * v2 - w2 * v1) / det;
150 const double s = (w1 * u2 - w2 * u1) / det;
152 const double lenU = std::sqrt(ux * ux + uy * uy + uz * uz);
153 const double lenV = std::sqrt(vx * vx + vy * vy + vz * vz);
154 const double paramTol = seuilConfondus / std::max(1.0, std::max(lenU, lenV));
156 if ((t < -paramTol) || (t > 1.0 + paramTol) || (
s < -paramTol) || (
s > 1.0 + paramTol))
161 pt.
_x = A.
_x + t * ux;
162 pt.
_y = A.
_y + t * uy;
163 pt.
_z = A.
_z + t * uz;
181 const std::string solverConfigPath =
"C:\\projects\\tympan_tools\\17534-3\\solver_conf.txt";
182 const std::string reflectionMethod =
184 if (reflectionMethod.compare(
"RAY_TRACING") == 0)
187 solverConfigPath, 200);
188 const unsigned int accelerator = config->Accelerator;
189 const unsigned int maxTreeDepth = config->MaxTreeDepth;
190 float rayMaxLength = config->MaxLength;
193 std::make_unique<TYReflectionPathFinderART>(nbRays, accelerator, maxTreeDepth, rayMaxLength);
197 const bool enableVisibilityPruning = config->EnableVisibilityPruning;
198 if (enableVisibilityPruning)
212 zmin = zmin.
div(C3 * C2);
217 const double d_SR,
const double d,
const double z,
237 const double dMax = std::max(d_SS, d_SR);
238 const double dMin =
std::min(d_SS, d_SR);
239 const double numerator = (dMax + e) * dMin * d;
241 for (std::size_t i = 0; i < TY_SPECTRE_OCT_NB_ELMT; ++i)
245 kMeteo[i] = std::exp(-(1.0 / 2000.0) * std::sqrt(numerator / (2.0 * (z - zMin[i]))));
267 for (std::size_t i = 0; i < TY_SPECTRE_OCT_NB_ELMT; ++i)
271 const double term = 2.0 + (C2 / lambda[i]) * c3[i] * z;
272 dz[i] = 10.0 * std::log10(1.0 + term * kmeteo[i]);
283 double distance)
const
287 const size_t multipleReflectionOrder = config->ReflectionOrder;
289 if (multipleReflectionOrder == 0)
297 std::unique_ptr<TYAbstractReflectionPathFinder> pReflectionPathFinderInstance =
300 pReflectionPathFinderInstance->setup(multipleReflectionOrder, tabIntersect, ray.
_ptA, ray.
_ptB);
302 while (pReflectionPathFinderInstance->remainingPaths())
308 std::deque<OPoint3D> imageSourcesList;
311 imageSourcesList.emplace_back();
324 TabChemins, distance);
329 size_t multipleReflectionOrder,
const std::deque<TYSIntersection>& tabIntersect,
const OSegment3D& ray,
332 std::vector<ReflectingSegmentCache> reflectingSegments;
333 reflectingSegments.reserve(tabIntersect.size());
337 for (
const auto& inter : tabIntersect)
339 if (inter.isInfra && inter.bIntersect[1])
345 if (reflectingSegments.empty())
350 std::vector<const TYSIntersection*> currentCombination;
351 currentCombination.reserve(multipleReflectionOrder);
353 std::deque<OPoint3D> currentImageSources;
354 currentImageSources.push_back(ray.
_ptA);
360 currentImageSources, tabIntersect, ray, source, TabChemins, distance);
364 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
365 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double hr,
double& Gs,
double& Gm,
double& Gr)
const
390 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
391 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double& Gs)
const
393 double heightRatio = 30.0;
396 if (pathPoints2D.size() < 2)
401 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
406 const double srcZoneLength = heightRatio * hs;
415 double traversedLength = 0.0;
416 double coveredLength = 0.0;
417 double weightedGroundSum = 0.0;
419 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
421 const OPoint3D& ptA = pathPoints2D[i];
422 const OPoint3D& ptB = pathPoints2D[i + 1];
425 const double currentSegmentLength = currentSegment.
longueur();
432 const double remainingLength = srcZoneLength - traversedLength;
442 if (remainingLength < currentSegmentLength)
444 const double alpha = remainingLength / currentSegmentLength;
446 ptEndZone.
_x = ptA.
_x + alpha * (ptB.
_x - ptA.
_x);
447 ptEndZone.
_y = ptA.
_y + alpha * (ptB.
_y - ptA.
_y);
448 ptEndZone.
_z = ptA.
_z + alpha * (ptB.
_z - ptA.
_z);
450 double GCurSeg = 0.0;
451 double dpCurSeg = 0.0;
452 computeGZone(ptA, ptEndZone, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
454 weightedGroundSum += GCurSeg;
455 coveredLength += dpCurSeg;
456 traversedLength = srcZoneLength;
462 double GCurSeg = 0.0;
463 double dpCurSeg = 0.0;
464 computeGZone(ptA, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
466 weightedGroundSum += GCurSeg;
467 coveredLength += dpCurSeg;
468 traversedLength += currentSegmentLength;
473 Gs = weightedGroundSum / coveredLength;
484 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
485 const std::deque<OPoint3D>& pathPoints2D,
double hr,
double& Gr)
const
487 double heightRatio = 30.0;
490 if (pathPoints2D.size() < 2)
495 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
500 const double rcpZoneLength = heightRatio * hr;
509 double traversedLength = 0.0;
510 double coveredLength = 0.0;
511 double weightedGroundSum = 0.0;
513 for (
size_t i = pathPoints2D.size() - 1; i > 0; --i)
515 const OPoint3D& ptA = pathPoints2D[i - 1];
516 const OPoint3D& ptB = pathPoints2D[i];
519 const double currentSegmentLength = currentSegment.
longueur();
526 const double remainingLength = rcpZoneLength - traversedLength;
534 if (remainingLength < currentSegmentLength)
536 const double alpha = remainingLength / currentSegmentLength;
541 ptStartZone.
_x = ptB.
_x + alpha * (ptA.
_x - ptB.
_x);
542 ptStartZone.
_y = ptB.
_y + alpha * (ptA.
_y - ptB.
_y);
543 ptStartZone.
_z = ptB.
_z + alpha * (ptA.
_z - ptB.
_z);
545 double GCurSeg = 0.0;
546 double dpCurSeg = 0.0;
547 computeGZone(ptStartZone, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i - 1]);
549 weightedGroundSum += GCurSeg;
550 coveredLength += dpCurSeg;
551 traversedLength = rcpZoneLength;
557 double GCurSeg = 0.0;
558 double dpCurSeg = 0.0;
559 computeGZone(ptA, ptB, GCurSeg, dpCurSeg, tabIntersectSegments[i - 1]);
561 weightedGroundSum += GCurSeg;
562 coveredLength += dpCurSeg;
563 traversedLength += currentSegmentLength;
568 Gr = weightedGroundSum / coveredLength;
579 const std::deque<std::deque<TYSIntersection>>& tabIntersectSegments,
580 const std::deque<OPoint3D>& pathPoints2D,
double hs,
double hr,
double& Gm)
const
582 double heightRatio = 30.0;
585 if (pathPoints2D.size() < 2)
590 if (tabIntersectSegments.size() != pathPoints2D.size() - 1)
595 const double srcZoneLength = heightRatio * hs;
596 const double rcpZoneLength = heightRatio * hr;
600 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
612 const double middleZoneBegin = srcZoneLength;
613 const double middleZoneEnd = dp - rcpZoneLength;
615 double traversedLength = 0.0;
616 double coveredLength = 0.0;
617 double weightedGroundSum = 0.0;
619 for (
size_t i = 0; i + 1 < pathPoints2D.size(); ++i)
621 const OPoint3D& ptA = pathPoints2D[i];
622 const OPoint3D& ptB = pathPoints2D[i + 1];
625 const double currentSegmentLength = currentSegment.
longueur();
632 const double segmentBegin = traversedLength;
633 const double segmentEnd = traversedLength + currentSegmentLength;
636 const double overlapBegin = std::max(segmentBegin, middleZoneBegin);
637 const double overlapEnd =
std::min(segmentEnd, middleZoneEnd);
641 const double alphaBegin = (overlapBegin - segmentBegin) / currentSegmentLength;
642 const double alphaEnd = (overlapEnd - segmentBegin) / currentSegmentLength;
645 ptZoneBegin.
_x = ptA.
_x + alphaBegin * (ptB.
_x - ptA.
_x);
646 ptZoneBegin.
_y = ptA.
_y + alphaBegin * (ptB.
_y - ptA.
_y);
647 ptZoneBegin.
_z = ptA.
_z + alphaBegin * (ptB.
_z - ptA.
_z);
650 ptZoneEnd.
_x = ptA.
_x + alphaEnd * (ptB.
_x - ptA.
_x);
651 ptZoneEnd._y = ptA.
_y + alphaEnd * (ptB.
_y - ptA.
_y);
652 ptZoneEnd._z = ptA.
_z + alphaEnd * (ptB.
_z - ptA.
_z);
654 double GCurSeg = 0.0;
655 double dpCurSeg = 0.0;
656 computeGZone(ptZoneBegin, ptZoneEnd, GCurSeg, dpCurSeg, tabIntersectSegments[i]);
658 weightedGroundSum += GCurSeg;
659 coveredLength += dpCurSeg;
662 traversedLength = segmentEnd;
667 Gm = weightedGroundSum / coveredLength;
683 const bool sameOrder = (seg1.
_ptA == seg2.
_ptA) && (seg1.
_ptB == seg2.
_ptB);
685 const bool reverseOrder = (seg1.
_ptA == seg2.
_ptB) && (seg1.
_ptB == seg2.
_ptA);
687 return sameOrder || reverseOrder;
691 const std::vector<const TYSIntersection*>& currentCombination,
692 const std::deque<OPoint3D>& imageSourcesList,
const OPoint3D& receptorPoint,
693 std::deque<OPoint3D>& reflectionPointsList)
const
695 reflectionPointsList.clear();
697 if (currentCombination.empty())
705 if (imageSourcesList.size() != currentCombination.size() + 1)
715 for (
int i =
static_cast<int>(currentCombination.size()) - 1; i >= 0; --i)
717 const OPoint3D& currentImageSource = imageSourcesList[i + 1];
718 const OSegment3D& currentBarrier = currentCombination[i]->segInter[1];
726 reflectionPointsList.clear();
730 reflectionPointsList.push_front(currentReflectionPoint);
731 nextPoint = currentReflectionPoint;
738 const std::vector<const TYSIntersection*>& barrierCombination,
739 const std::deque<OPoint3D>& reflectionPointsList,
const std::deque<TYSIntersection>& tabIntersect,
742 const size_t reflectionOrder = barrierCombination.size();
744 if (reflectionPointsList.size() != reflectionOrder)
749 std::deque<OPoint3D> pathPoints;
750 pathPoints.push_back(sourcePoint);
751 for (
const auto& point : reflectionPointsList)
753 pathPoints.push_back(point);
755 pathPoints.push_back(receptorPoint);
759 for (
size_t i = 0; i <= reflectionOrder; ++i)
761 const OSegment3D pathSegment(pathPoints[i], pathPoints[i + 1]);
763 for (
const auto& sceneBarrier : tabIntersect)
776 if (sceneBarrier.segInter[1].intersects(pathSegment, intersectionPoint,
TYSEUILCONFONDUS))
787 const std::vector<const TYSIntersection*>& barrierCombination,
788 const std::deque<OPoint3D>& imageSourcesList,
const std::deque<OPoint3D>& reflectionPointsList,
790 double distance)
const
792 const size_t reflectionOrder = barrierCombination.size();
794 if (reflectionOrder == 0)
799 if (imageSourcesList.size() != reflectionOrder + 1)
804 if (reflectionPointsList.size() != reflectionOrder)
813 std::deque<OPoint3D> pathPoints;
814 std::deque<OPoint3D> pathPoints2D;
815 std::deque<double> sourceReflectionPointLengths;
816 std::deque<double> reflectionPointReceptorLengths;
818 pathPoints.push_back(directRay.
_ptA);
820 for (
const auto& point : reflectionPointsList)
822 pathPoints.push_back(point);
825 pathPoints.push_back(directRay.
_ptB);
828 double pathLength = 0.0;
833 double segLength = 0.0;
835 for (
size_t i = 0; i + 1 < pathPoints.size(); ++i)
838 segLength =
segment.longueur();
839 pathLength += segLength;
840 if (i < pathPoints.size() - 2)
842 sourceReflectionPointLengths.push_back(pathLength);
843 reflectionPointReceptorLengths.push_back(-pathLength);
850 pathPoints2D.push_back(A2D);
852 pathPoints2D.push_back(B2D);
854 for (
size_t i = 0; i < reflectionOrder; ++i)
856 reflectionPointReceptorLengths[i] += pathLength;
861 etape.
_pt = pathPoints[0];
864 const OSegment3D firstLeg(pathPoints[0], pathPoints[1]);
868 tabEtapes.push_back(etape);
871 for (
size_t i = 0; i < reflectionOrder; ++i)
876 if (material ==
nullptr)
881 if (!barrierCombination[i]->pFaceGeomData)
895 etape.
_pt = reflectionPointsList[i];
899 tabEtapes.push_back(etape);
905 double hs{0.0}, hr{0.0};
908 double Gs{0.0}, Gm{0.0}, Gr{0.0};
912 std::deque<std::deque<TYSIntersection>> tabIntersectSegments;
914 tabIntersectSegments.resize(reflectionOrder + 1);
915 for (
size_t i = 0; i < reflectionOrder + 1; ++i)
917 seg =
OSegment3D{pathPoints[i], pathPoints[i + 1]};
923 std::unique_ptr<TYChemin9613Solver> chemin =
createChemin();
925 chemin->setLongueur(pathLength);
926 chemin->setDistance(distance);
927 chemin->calcAttenuation(tabEtapes, *
_pSolverAtmos, dp, hs, hr, Gs, Gm, Gr);
932 for (
size_t i = 0; i < reflectionOrder; ++i)
934 const OPoint3D& Oprev = pathPoints[i];
935 const OPoint3D& O = pathPoints[i + 1];
937 boost::shared_ptr<tympan::AcousticFaceGeomDataInfra> pFaceGeomDataInfra =
938 boost::dynamic_pointer_cast<tympan::AcousticFaceGeomDataInfra, tympan::AcousticFaceGeomData>(
939 barrierCombination[i]->pFaceGeomData);
940 const double a = pFaceGeomDataInfra->a;
941 const double h = pFaceGeomDataInfra->h;
942 const OVector3D& normal = pFaceGeomDataInfra->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)
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 issued from infra...
Data structure to store geometrical data of the surface from which comes a triangle.