23 #ifndef TYSET_GEOMETRIQUE_PARCOURS_H
24 #define TYSET_GEOMETRIQUE_PARCOURS_H
34 #define MAX_POINTS 32767
40 #define INDENTIFIANT_SOURCE MAX_POINTS
41 #define INDENTIFIANT_RECEPTEUR (MAX_POINTS - 1)
118 bool*& PointsADroite);
121 int* IndexePointsFrontiere,
int& NbPointsFrontiere,
122 std::vector<bool>& pEstUnPointIntersectant,
bool bCoteGauche,
123 bool* PointsAGauche,
bool* PointsADroite);
143 int NbPointsFrontiere, std::vector<bool>& pEstUnPointIntersectant,
Connexite* Connexes,
156 int compteurIter = 0,
bool bIsLastSecondePasse =
false);
159 int* IndexePointsFrontiere,
int NbPointsFrontiere);
164 int nIndexeNbPremierPointAAjouter,
int nIndexeDernierPointAAjouter);
167 std::vector<bool>& pEstUnPointIntersectant,
219 bool bPremiersPointsLesPlusHauts);
232 bool bSens,
bool bGardeIdentifiant);
Polylines path class used by the TYSetGeometriqueParcours class.
Class to build a geometric path used by the TYCalculParcours class.
void MarquePointsADroiteEtAGauche(TYPointParcours &Srce, TYPointParcours &Dest, bool *&PointsAGauche, bool *&PointsADroite)
Mark points on the left and on the right of the current geometric path.
int ParcourtPolyligneAPartirDe(int IndexPointRacine, TYPolyligneParcours *&PolyligneRacine, std::vector< bool > &pEstUnPointIntersectant, TYSetGeometriqueParcours &geoPremierePasse)
To be commented.
bool intersects(TYPointParcours &P1, TYPointParcours &P2)
Check if [P1P2] segment can intersect the geometric path.
void Clean()
Delete polylines list and points list.
bool SecondePasse(TYSetGeometriqueParcours &geoPremierePasse, TYSetGeometriqueParcours &geoSecondePasse, bool bTrajetsAGaucheDeSR, TYPointParcours **&pTableauEC, int &nbPtsEC, int compteurIter=0, bool bIsLastSecondePasse=false)
Second pass.
bool polyligneContientSouR(int i)
Returns true if polyligne of index i contains Source or Receptor.
void RamenerPointsTraversantLaFrontiere(TYPointParcours &Srce, TYPointParcours &Dest, int *IndexePointsFrontiere, int &NbPointsFrontiere, std::vector< bool > &pEstUnPointIntersectant, bool bCoteGauche, bool *PointsAGauche, bool *PointsADroite)
To be commented.
void SwapPolyligne(int i, int j)
Swap polylines i and j.
static int EnveloppeConvexeLes2PremiersPointsEtant(TYPointParcours **TableauDePoints, int nNbPoints, TYPointParcours **TableauDePointsECOut, bool bPremiersPointsLesPlusHauts)
Compute the convex hull (arrays should be allocated before the call)
int SupressionPolylignesRedondantes()
Suppress useless polylines.
TYPolyligneParcours * _ListePolylines
Geometric path as a polylines.
void TriePointsIntersectionSuivantSR(TYPointParcours &Srce, TYPointParcours &Dest, int *IndexePointsFrontiere, int NbPointsFrontiere)
To be commented.
static TYPointParcours * _DestQSort
static access to the C function of quicksort
int SelectionnePointsEntreSetRetDuCoteDeSR(TYSetGeometriqueParcours *geoSR, TYPointParcours **TableauDePoints, int nNbPoints)
Select points from the current geometric path which are between source and receptor of the geoSR geom...
bool PolylignesInfraFermees()
Return true if all polylines from infrastructure are closed.
void CreerTrajetAPartirDuneListeDePointsTriee(TYPointParcours **TableauDePoints, int nNbPoints, bool bSens, bool bGardeIdentifiant)
Create paths from a sorted points list (Used only for vertical paths)
static TYPointParcours * _SrceQSort
static access to the C function of quicksort
void SeparationDroiteGauche(bool *PointsAGauche, bool *PointsADroite, TYSetGeometriqueParcours &geoGauche, TYSetGeometriqueParcours &geoDroite, int compteurIter=0)
Separate left and right polylines with two geometric paths.
~TYSetGeometriqueParcours()
Destructor.
bool coincideWith(TYSetGeometriqueParcours &otherGeoPasse)
Tests if the first polyline of this geo parcours coincide with the geo passe in argument,...
static void InverseOrdreDesPoints(TYPointParcours **ListeDePointsAInverser, int nNbPointsDeLaListe)
Invert a list of points.
int _nNbPolylines
Polylines number.
TYPointParcours * _ListePoint
List of points on the path.
void Copy(TYSetGeometriqueParcours &geoIn)
Copy operator.
int _nNbPointTotal
Total number of points.
static TYPointParcours * _ListePointQSort
static access to the C function of quicksort
bool AjoutePointALaPolyLigne(int indexPolyligne, TYPointParcours &P)
Add a point P to the polyline indexPolyligne.
void Init()
Initialize data.
void AllouerPolylignes(int nNbPolylineAllouee)
Allocation of the polylines list.
bool PremierePasse(TYPointParcours &Srce, TYPointParcours &Dest, int *IndexePointsFrontiere, int NbPointsFrontiere, std::vector< bool > &pEstUnPointIntersectant, Connexite *Connexes, TYSetGeometriqueParcours &geoPremierePasse, int compteurIter=0)
First pass to build a path along all the intersecting polylines.
bool ListerPointsConnexes(Connexite *&Connexes, std::vector< bool > &pEstUnPointIntersectant)
Fill for each point the connectivity with segments.
int MergePointsDoubles()
Detect and fix double points.
bool AppartienneMemePolyligne(TYPointParcours *a, TYPointParcours *b, TYPointParcours *c)
Check if the points a, b, c belong to the same polyline.
int AjouteLesPointsComprisEntre(TYSetGeometriqueParcours &geoPolySource, int nIndexePoly, int nIndexeNbPremierPointAAjouter, int nIndexeDernierPointAAjouter)
Add some points of the nIndexePoly polyline from the geoPolySource geometric path.
bool extendListePoint(int nNouvelleTaille)
Extends the attribute array _ListePoint.
int _nNbPolylineAllouee
Allocated polylines.
TYSetGeometriqueParcours()
Constructor.
#define SAFE_DELETE_LIST(_p)
Connectivity between points and segments.
int IndexesSegment[2]
Two indexes of the segment.
int NbSegmentsConnexes
Related segments number.