|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Reflection path finder relying on ray-tracing using the AcousticRaytracer module. More...
#include <TYReflectionPathFinder.h>


Public Member Functions | |
| TYReflectionPathFinderART (unsigned int nbRays) | |
| std::unique_ptr< TYAbstractReflectionPathFinder > | instanciate () const override |
| Instanciate a new TYReflectionPathFinderART. The configuration of the former path finder (number of rays, ...) is transfered to the new instance. More... | |
| bool | setup (size_t maxOrder, const std::deque< TYSIntersection > &tabIntersect, const OPoint3D &source, const OPoint3D &receptor) override |
| Set the scene to be treated by the path finder. More... | |
| bool | remainingPaths () const override |
| Tell if some paths remain in the set of remaining paths. More... | |
| TYReflectionPath | popPath () override |
| Give the last computed reflection path, and remove it from the set of remaining paths. More... | |
Public Member Functions inherited from TYAbstractReflectionPathFinder | |
| virtual | ~TYAbstractReflectionPathFinder ()=default |
Protected Member Functions | |
| TYReflectionPathFinderART ()=default | |
| void | setupConfiguration (size_t maxOrder) |
| Setup ART' Simulation configuration. More... | |
| bool | setupScene (const std::deque< TYSIntersection > &tabIntersect, const OPoint3D &sourcePoint, const OPoint3D &receptorPoint) |
| Build an AcousticRaytracer scene containing one source, one receptor, and a collection of faces. The faces are built from intersecting segments in EL-plane. Each segment is extruded along normal direction of EL-plane towards up and down directions of a certain length, to avoid singularities (ray-border of faces intersections) during ray tracing. More... | |
| void | setupAcceleratingDataStructure () |
| Setup accelerating data-structure using ART' Simulation configuration. More... | |
| void | setupSolver () |
| Setup ART' simulation solver. More... | |
| void | computeRaytracing () |
| Perform raytracing simulation. More... | |
| void | buildReflectionPaths (const OPoint3D &source, const OPoint3D &receptor) |
| Build reflection paths from valid rays found by the solver. For each sequence of reflecting barriers, only one path is built. More... | |
| bool | processIntersectingSegment (const TYSIntersection &inter) |
| Process an intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene. Intersecting segments which do not belong to EL-plane are ignored. More... | |
| bool | processInfraIntersectingSegment (const TYSIntersection &inter) |
| Process an infrastructure intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene. More... | |
| bool | processTopoIntersectingSegment (const TYSIntersection &inter) |
| Process a topography intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene. More... | |
| void | buildQuadranglePointsFromInter (const TYSIntersection &inter, OPoint3D &p1Top, OPoint3D &p1Bottom, OPoint3D &p2Top, OPoint3D &p2Bottom) const |
| Compute points forming a quadrangle from an intersecting segment in EL-plane. Points are obtained by adding or substracting _extrusionLength along the normal direction of EL-plane to points forming the segment. More... | |
| void | addOrientedQuadrangle (const OPoint3D &p1Top, const OPoint3D &p1Bottom, const OPoint3D &p2Top, const OPoint3D &p2Bottom, const OVector3D vExt, const TYSIntersection &sourceInter) |
| Add an oriented quadrangle to the AcousticRaytracer' simulation scene. The quadrangle is oriented using a vector pointing towards the exterior of the quadrangle. The address of the intersecting segment from which come the quadrangle is used to map the added quadrangle to the intersecting segment. More... | |
| Shape * | addOrientedTriangle (const OPoint3D &p1, const OPoint3D &p2, const OPoint3D &p3, const OVector3D &vExt) |
| Add an oriented triangle to the AcousticRaytracer' simulation scene. The vertices (v1 = p1, v2 = p2 or p3, v3 = p2 or p3) are set such that the normal of the triangle (v2-v1) x (v3-v1) is oriented the same than vExt. More... | |
| OVector3D | computeELPlaneNormal (const OPoint3D &source, const OPoint3D &receptor) |
| Compute a normal vector of the EL-plane Hypothesis: source and receptor are not aligned along a vertical line. More... | |
| bool | isPathValid (const TYReflectionPath &path) |
| Check if a path is valid. In plus of validation performed during raytracing, it has to be verified: More... | |
| bool | isPathAlreadyFound (const TYReflectionPath &path) const |
| Check if a path has already been found. More... | |
| bool | isLastSegmentIntersectingSceneElement (const TYReflectionPath &path) |
| Check if the last segment of a path intersects a scene element. More... | |
Protected Member Functions inherited from TYAbstractReflectionPathFinder | |
| TYAbstractReflectionPathFinder ()=default | |
Private Member Functions | |
| void | computeRadiusFromDistanceSR (const OPoint3D &sourcePoint, const OPoint3D &rcptPoint) |
| Compute receiver radius from source and receiver points. More... | |
| FRIEND_TEST (test_ReflectionPathFinderART, computeELPlaneNormal_horizontalPlane1) | |
| FRIEND_TEST (test_ReflectionPathFinderART, computeELPlaneNormal_horizontalPlane2) | |
| FRIEND_TEST (test_ReflectionPathFinderART, computeELPlaneNormal_nonHorizontalPlane) | |
Private Attributes | |
| Simulation | _ARTSimulation |
| std::unique_ptr< Solver > | _pSolver |
| std::set< std::vector< const TYSIntersection * > > | _foundSequences |
| std::deque< TYReflectionPath > | _paths |
| std::unordered_map< const Shape *, const TYSIntersection * > | _shapeToTYSIntersection |
| unsigned int | _nbRays |
| double | _rcptRadius |
| double | _extrusionLength |
| OVector3D | _ELnormal |
Reflection path finder relying on ray-tracing using the AcousticRaytracer module.
Definition at line 83 of file TYReflectionPathFinder.h.
| TYReflectionPathFinderART::TYReflectionPathFinderART | ( | unsigned int | nbRays | ) |
Constructor
| nbRays | number of rays to spawn from the source |
Definition at line 19 of file TYReflectionPathFinder.cpp.

|
protecteddefault |
|
protected |
Add an oriented quadrangle to the AcousticRaytracer' simulation scene. The quadrangle is oriented using a vector pointing towards the exterior of the quadrangle. The address of the intersecting segment from which come the quadrangle is used to map the added quadrangle to the intersecting segment.
p1Top p2Top +---------—+ | | | | +---------—+ p1Bottom p2Bottom
| p1Top | |
| p1Bottom | |
| p2Top | |
| p2Bottom | |
| vExt | vector defining the exterior direction of the quadrangle |
| sourceInter | intersecting segment from which come the quadrangle |
Definition at line 274 of file TYReflectionPathFinder.cpp.


|
protected |
Add an oriented triangle to the AcousticRaytracer' simulation scene. The vertices (v1 = p1, v2 = p2 or p3, v3 = p2 or p3) are set such that the normal of the triangle (v2-v1) x (v3-v1) is oriented the same than vExt.
| p1 | first point |
| p2 | second point |
| p3 | third point |
| vExt | vector defining the exterior direction of the triangle |
Definition at line 285 of file TYReflectionPathFinder.cpp.


|
protected |
Compute points forming a quadrangle from an intersecting segment in EL-plane. Points are obtained by adding or substracting _extrusionLength along the normal direction of EL-plane to points forming the segment.
| inter | [in] intersecting segment from which creating the quadrangle |
| p1Top | [out] point created above the first segment point |
| p1Bottom | [out] point created below the first segment point |
| p2Top | [out] point created above the second segment point |
| p2Bottom | [out] point created below the second segment point |
Definition at line 259 of file TYReflectionPathFinder.cpp.

|
protected |
Build reflection paths from valid rays found by the solver. For each sequence of reflecting barriers, only one path is built.
| source | source point |
| receptor | receptor point |
Definition at line 158 of file TYReflectionPathFinder.cpp.


|
protected |
Compute a normal vector of the EL-plane Hypothesis: source and receptor are not aligned along a vertical line.
| source | source point |
| receptor | receptor point |
Definition at line 313 of file TYReflectionPathFinder.cpp.


|
private |
Compute receiver radius from source and receiver points.
| sourcePoint | Source point |
| rcptPoint | Receptor point |
Definition at line 62 of file TYReflectionPathFinder.cpp.


|
protected |
Perform raytracing simulation.
Definition at line 153 of file TYReflectionPathFinder.cpp.


|
private |
|
private |
|
private |
|
overridevirtual |
Instanciate a new TYReflectionPathFinderART. The configuration of the former path finder (number of rays, ...) is transfered to the new instance.
Implements TYAbstractReflectionPathFinder.
Definition at line 36 of file TYReflectionPathFinder.cpp.
|
protected |
Check if the last segment of a path intersects a scene element.
| path | the path to check |
Definition at line 341 of file TYReflectionPathFinder.cpp.


|
protected |
Check if a path has already been found.
| path | the path to check |
Definition at line 336 of file TYReflectionPathFinder.cpp.

|
protected |
Check if a path is valid. In plus of validation performed during raytracing, it has to be verified:
| path | the path to check |
Definition at line 323 of file TYReflectionPathFinder.cpp.


|
overridevirtual |
Give the last computed reflection path, and remove it from the set of remaining paths.
Implements TYAbstractReflectionPathFinder.
Definition at line 68 of file TYReflectionPathFinder.cpp.
|
protected |
Process an infrastructure intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene.
The triangles forming the face are oriented so that the normal of the triangles point towards the same direction than the normal of the face whose cut produced the intersecting segment. This way, it is guaranteed that any intersection between a ray spawned outdoor and one of the triangles forming the face are found.
+ ^
/| / normal of the face from which the intersecting segment comes
| + |/
| inter | intersecting segment used to form the face |
Definition at line 219 of file TYReflectionPathFinder.cpp.


|
protected |
Process an intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene. Intersecting segments which do not belong to EL-plane are ignored.
| inter | intersecting segment to process |
Definition at line 198 of file TYReflectionPathFinder.cpp.


|
protected |
Process a topography intersecting segment in EL-plane to add equivalent faces in the AcousticRaytracer' simulation scene.
The normal of the topography element whose cut produced the intersecting segment is not known by the intersecting segment. In order to guaranty that any intersection between a ray spawned outdoor and one of the triangles forming the face will be found:
epsilon
<--->
+ +
/| /| ---> one possible normal in EL-plane
| inter | intersecting segment used to form the face |
Definition at line 235 of file TYReflectionPathFinder.cpp.


|
overridevirtual |
Tell if some paths remain in the set of remaining paths.
popPath Implements TYAbstractReflectionPathFinder.
Definition at line 57 of file TYReflectionPathFinder.cpp.
|
overridevirtual |
Set the scene to be treated by the path finder.
| maxOrder | maximum order of the reflection paths to find |
| tabIntersect | set of intersecting segments of the scene |
| source | source point from which reflection paths must start |
| receptor | receptor point to which reflection paths must end |
Implements TYAbstractReflectionPathFinder.
Definition at line 41 of file TYReflectionPathFinder.cpp.

|
protected |
Setup accelerating data-structure using ART' Simulation configuration.
Definition at line 127 of file TYReflectionPathFinder.cpp.


|
protected |
Setup ART' Simulation configuration.
Definition at line 82 of file TYReflectionPathFinder.cpp.


|
protected |
Build an AcousticRaytracer scene containing one source, one receptor, and a collection of faces. The faces are built from intersecting segments in EL-plane. Each segment is extruded along normal direction of EL-plane towards up and down directions of a certain length, to avoid singularities (ray-border of faces intersections) during ray tracing.
Rays are sampled uniformly in EL-plane, the number of rays being controlled by _nbRays. The receptor is modelled as a sphere, controlled by _rcptRadius.
| tabIntersect | set of intersecting segments of the scene |
| sourcePoint | location of the source |
| receptorPoint | location of the receptor |
Definition at line 88 of file TYReflectionPathFinder.cpp.


|
protected |
Setup ART' simulation solver.
Definition at line 142 of file TYReflectionPathFinder.cpp.


|
private |
Definition at line 313 of file TYReflectionPathFinder.h.
|
private |
Definition at line 321 of file TYReflectionPathFinder.h.
|
private |
Definition at line 320 of file TYReflectionPathFinder.h.
|
private |
Definition at line 315 of file TYReflectionPathFinder.h.
|
private |
Definition at line 318 of file TYReflectionPathFinder.h.
|
private |
Definition at line 316 of file TYReflectionPathFinder.h.
|
private |
Definition at line 314 of file TYReflectionPathFinder.h.
|
private |
Definition at line 319 of file TYReflectionPathFinder.h.
|
private |
Definition at line 317 of file TYReflectionPathFinder.h.