53 for (
unsigned i = 0; i < nbFaces; i++)
58 if ( (SI.
volume_id.size() != 0) && (source_id.size() != 0) )
65 bool bVertical =
CalculSegmentCoupe(SI, intersection, plan[0].pt1, plan[0].pt2, plan[0].pt3, 0);
66 bool bHorizontal =
CalculSegmentCoupe(SI, intersection, plan[1].pt1, plan[1].pt2, plan[1].pt3, 1);
68 if (bVertical || bHorizontal) { tabIntersect.push_back(intersection); }
76 std::deque<unsigned int> indices;
77 std::deque<TYSIntersection> temp;
80 for (
size_t i=0; i<tabIntersect.size(); i++)
82 if (tabIntersect[i].isInfra)
84 temp.push_back(tabIntersect[i]);
93 for (
size_t i=0; i<indices.size(); i++)
95 temp.push_back(tabIntersect[indices[i]]);
104 double planOffset = 10.0;
111 tmpPlan.
pt3 = tmpPlan.
pt1;
112 tmpPlan.
pt3.
_z += planOffset;
118 tmpPlan.
pt2.
_x += planOffset;
119 tmpPlan.
pt2.
_y += planOffset;
161 const int& indice)
const 170 OPlan planRayon(pt1, pt2, pt3);
174 Intersect.
segInter[indice] = segInter;
This file provides the declaration of the entities of the model, which inherit from BaseEntity...
const std::vector< TYStructSurfIntersect > & getTabPolygon() const
Get the array of polygons.
TYSolver & _solver
Reference to the solver.
Structure to describe a plan defined with 3 points.
OPoint3D _ptB
Point B of the segment.
OPoint3D _ptA
Point A of the segment.
bool buildPlans(TYSPlan *plan, const OSegment3D &rayon)
TYFaceSelector(TYSolver &solver)
tympan::AcousticMaterialBase * material
Triangle material.
void reorder_intersect(std::deque< TYSIntersection > &tabIntersect)
put infrastructure faces on top
bool bIntersect[2]
Flag to indicate the face cuts vertical plane ([0]) or horizontal plane ([1])
int intersectsSurface(const TabPoint3D &contour, OSegment3D &segment) const
Compute intersection between a plan and a surface defined by his bounds.
void getPtSetPtRfromOSeg3D(OSegment3D &seg) const
bool isEcran
Flag to define if is a screen face.
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path.
string volume_id
Volume id.
double _y
y coordinate of OCoord3D
double _x
x coordinate of OCoord3D
Plan defined by its equation : ax+by+cz+d=0.
TabPoint3D tabPoint
Points array used during the pre-selection.
virtual void selectFaces(std::deque< TYSIntersection > &tabIntersect, const TYTrajet &rayon)
Build the array of intersections.
bool isInfra
Flag to define if is a infrastructure face.
bool CalculSegmentCoupe(const TYStructSurfIntersect &FaceCourante, TYSIntersection &Intersect, OPoint3D &pt1, OPoint3D &pt2, OPoint3D &pt3, const int &indice) const
tympan::AcousticMaterialBase * material
Pointer to a material.
Data structure for intersections.
Class to define a segment.
bool noIntersect
Flag to indicate that the face should not be tested for intersection.
Describe surface intersections.
virtual ~TYFaceSelector()
OSegment3D segInter[2]
Intersection segment between face and vertical plane ([0]) and horizontal plane ([1]) ...
double _z
z coordinate of OCoord3D
string volume_id
Volume id.
tympan::AcousticSource & asrc
Business source.
bool is_infra() const
Detect if a face is on a infrastructure (has a material)