CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
|
Geometry class used to represent co-incident lines (for profiles/polygon-to-polygon boundaries) More...
#include <multi_line.h>
Inherits CGeomLine.
Inherited by CGeomProfile.
Public Member Functions | |
CGeomMultiLine (void) | |
Constructor, no parameters. | |
~CGeomMultiLine (void) override | |
Destructor. | |
void | AppendLineSegment (void) |
Appends a new empty line segment. | |
void | AppendLineSegment (vector< pair< int, int > > *) |
Appends a line segment which is supplied as a parameter. | |
int | nGetNumLineSegments (void) const |
Appends a line segment which then inherits from the preceding line segments. | |
void | TruncateLineSegments (int const) |
Cuts short the number of line segments. | |
void | InsertLineSegment (int const) |
Inserts a line segment, inheriting from preceding line segments. | |
vector< vector< pair< int, int > > > | prVVGetAllLineSegAfter (int const) |
Returns a vector of the line segments which succeed the specified line segment number. | |
void | RemoveLineSegment (int const) |
Removes a line segment. | |
void | AppendCoincidentProfileToLineSegments (pair< int, int > const) |
Appends a coincident profile pair to the CGeomMultiLine object's final line segment. | |
void | AddCoincidentProfileToExistingLineSegment (int const, int const, int const) |
Adds a coincident profile to a pre-existing line segment of the CGeomMultiLine object. | |
vector< pair< int, int > > * | pprVGetPairedCoincidentProfilesForLineSegment (int const) |
Returns a vector of pairs (a line segment) | |
int | nGetCoincidentProfileForLineSegment (int const, int const) const |
Returns the numbers of coincident profiles. | |
int | nGetNumCoincidentProfilesInLineSegment (int const) |
Returns the count of coincident profiles in a specified line segment. | |
bool | bFindProfileInCoincidentProfilesOfLastLineSegment (int const) |
Returns true if the given profile number is amongst the coincident profiles of the CGeomMultiLine object's final line segment. | |
bool | bFindProfileInCoincidentProfiles (int const) |
Returns true if the given profile number is one of the coincident profiles of the a specified line segment. | |
void | GetMostCoastwardSharedLineSegment (int const, int &, int &) |
Finds the number of the most coastward line segment for which the two profiles are coincident, or -1 if they are not coincident. If they are coincident, also finds the line segment of the other profile. | |
int | nGetProf (int const, int const) const |
Returns the profile number, given a line segment and the index of the co-incident profile for that line segment. | |
int | nGetProfsLineSeg (int const, int const) const |
Returns the profile's own line segment, given a line segment and the index of the co-incident profile for that line segment. | |
void | SetProfsLineSeg (int const, int const, int const) |
Sets a profile's own line segment number, given a line segment and the index of the co-incident profile for that line segment. | |
![]() | |
CGeomLine (void) | |
Constructor. | |
CGeomLine (CGeom2DPoint const *, CGeom2DPoint const *) | |
Overloaded constructor with two points as parameters. | |
CGeomLine (int const) | |
Overloaded constructor with one parameter, this creates a given number of uninitialized points. | |
~CGeomLine (void) override | |
Destructor. | |
double | dGetXAt (int const) |
Returns the X value at a given place in the line. | |
double | dGetYAt (int const) |
Returns the Y value at a given place in the line. | |
CGeom2DPoint * | pPtGetAt (int const) |
Returns the point at a given place in the line. | |
![]() | |
void | Reverse (void) |
Reverses the sequence of points in the vector which represents this 2D polygon. | |
int | nGetSize (void) const |
void | Resize (int const) |
Resizes the vector which represents this 2D shape. | |
void | Append (CGeom2DPoint const *) |
Appends a point to this 2D shape. | |
void | Append (double const, double const) |
Appends a point to this 2D shape. | |
void | AppendIfNotAlready (double const, double const) |
Appends a point to this 2D shape only if it isn't already in the shape vector. | |
CGeom2DPoint * | pPtBack (void) |
Returns the last element of this 2D shape. | |
CGeom2DPoint & | operator[] (int const) |
Operator to return one point of this 2D shape. | |
vector< CGeom2DPoint > * | pPtVGetPoints (void) |
Returns the address of the vector which represents this 2D shape. | |
Private Attributes | |
vector< vector< pair< int, int > > > | m_prVVLineSegment |
A vector of line segments, each element is a vector of pairs. The first of the pair is a co-incident profile number, the second is that profile's 'own' line segment number. | |
Additional Inherited Members | |
![]() | |
void | Display (void) override |
Instantiates the pure virtual function in the abstract parent class, so that CGeomLine is not an abstract class. | |
![]() | |
CA2DShape (void) | |
Constructor. | |
virtual | ~CA2DShape (void) |
Destructor. | |
void | Clear (void) |
Clears this 2D shape. | |
![]() | |
vector< CGeom2DPoint > | m_VPoints |
The points which comprise the float-coordinate 2D shape. | |
Geometry class used to represent co-incident lines (for profiles/polygon-to-polygon boundaries)
TODO 001 This is a more detailed description of the CGeomMultiLine class.
Definition at line 34 of file multi_line.h.
CGeomMultiLine::CGeomMultiLine | ( | void | ) |
Constructor, no parameters.
Definition at line 30 of file multi_line.cpp.
|
override |
Destructor.
Definition at line 35 of file multi_line.cpp.
void CGeomMultiLine::AddCoincidentProfileToExistingLineSegment | ( | int const | nSegment, |
int const | nProfile, | ||
int const | nLineSeg ) |
Adds a coincident profile to a pre-existing line segment of the CGeomMultiLine object.
Definition at line 141 of file multi_line.cpp.
Referenced by CSimulation::nInsertPointIntoProfilesIfNeededThenUpdate().
void CGeomMultiLine::AppendCoincidentProfileToLineSegments | ( | pair< int, int > const | prIn | ) |
Appends a coincident profile pair to the CGeomMultiLine object's final line segment.
Definition at line 133 of file multi_line.cpp.
Referenced by CSimulation::MergeProfilesAtFinalLineSegments(), CSimulation::nCreateProfile(), and CSimulation::nLocateAndCreateGridEdgeProfile().
Appends a line segment which is supplied as a parameter.
Definition at line 46 of file multi_line.cpp.
void CGeomMultiLine::AppendLineSegment | ( | void | ) |
Appends a new empty line segment.
Definition at line 40 of file multi_line.cpp.
Referenced by CSimulation::MergeProfilesAtFinalLineSegments(), CSimulation::nCreateProfile(), CSimulation::nLocateAndCreateGridEdgeProfile(), and CSimulation::TruncateProfileAndAppendNew().
bool CGeomMultiLine::bFindProfileInCoincidentProfiles | ( | int const | nProfile | ) |
Returns true if the given profile number is one of the coincident profiles of the a specified line segment.
Returns true if the given profile number is a coincident profile of any line segment of the CGeomMultiLine object
Definition at line 205 of file multi_line.cpp.
Referenced by CSimulation::nCreateAllPolygons().
bool CGeomMultiLine::bFindProfileInCoincidentProfilesOfLastLineSegment | ( | int const | nProfile | ) |
Returns true if the given profile number is amongst the coincident profiles of the CGeomMultiLine object's final line segment.
Definition at line 175 of file multi_line.cpp.
Referenced by CSimulation::CheckForIntersectingProfiles().
void CGeomMultiLine::GetMostCoastwardSharedLineSegment | ( | int const | nOtherProfile, |
int & | nThisLineSegment, | ||
int & | nOtherLineSegment ) |
Finds the number of the most coastward line segment for which the two profiles are coincident, or -1 if they are not coincident. If they are coincident, also finds the line segment of the other profile.
Definition at line 224 of file multi_line.cpp.
Referenced by CSimulation::nCreateAllPolygons().
void CGeomMultiLine::InsertLineSegment | ( | int const | nSegment | ) |
Inserts a line segment, inheriting from preceding line segments.
Definition at line 85 of file multi_line.cpp.
Referenced by CGeomProfile::bInsertIntersection().
int CGeomMultiLine::nGetCoincidentProfileForLineSegment | ( | int const | nSegment, |
int const | nCoinc ) const |
Returns the numbers of coincident profiles.
Definition at line 155 of file multi_line.cpp.
Referenced by CSimulation::nDoPolygonSharedBoundaries().
int CGeomMultiLine::nGetNumCoincidentProfilesInLineSegment | ( | int const | nSegment | ) |
Returns the count of coincident profiles in a specified line segment.
Definition at line 169 of file multi_line.cpp.
Referenced by CSimulation::CreateRasterizedProfile(), CSimulation::nDoPolygonSharedBoundaries(), and CSimulation::TruncateProfileAndAppendNew().
int CGeomMultiLine::nGetNumLineSegments | ( | void | ) | const |
Appends a line segment which then inherits from the preceding line segments.
Returns the CGeomMultiLine object's number of line segments
Definition at line 73 of file multi_line.cpp.
Referenced by CSimulation::bCheckForIntersection(), CGeomProfile::bInsertIntersection(), CSimulation::CheckForIntersectingProfiles(), CSimulation::CreateRasterizedProfile(), CSimulation::nInsertPointIntoProfilesIfNeededThenUpdate(), and CSimulation::TruncateProfileAndAppendNew().
int CGeomMultiLine::nGetProf | ( | int const | nSegment, |
int const | nCoinc ) const |
Returns the profile number, given a line segment and the index of the co-incident profile for that line segment.
Definition at line 249 of file multi_line.cpp.
Referenced by CSimulation::TruncateProfileAndAppendNew().
int CGeomMultiLine::nGetProfsLineSeg | ( | int const | nSegment, |
int const | nCoinc ) const |
Returns the profile's own line segment, given a line segment and the index of the co-incident profile for that line segment.
Definition at line 255 of file multi_line.cpp.
Referenced by CSimulation::TruncateProfileAndAppendNew().
vector< pair< int, int > > * CGeomMultiLine::pprVGetPairedCoincidentProfilesForLineSegment | ( | int const | nSegment | ) |
Returns a vector of pairs (a line segment)
Definition at line 148 of file multi_line.cpp.
Referenced by CSimulation::MergeProfilesAtFinalLineSegments(), CSimulation::nInsertPointIntoProfilesIfNeededThenUpdate(), and CSimulation::TruncateProfileAndAppendNew().
Returns a vector of the line segments which succeed the specified line segment number.
Definition at line 117 of file multi_line.cpp.
Referenced by CSimulation::TruncateOneProfileRetainOtherProfile().
void CGeomMultiLine::RemoveLineSegment | ( | int const | nSegment | ) |
Removes a line segment.
Definition at line 127 of file multi_line.cpp.
void CGeomMultiLine::SetProfsLineSeg | ( | int const | nSegment, |
int const | nCoinc, | ||
int const | nLineSeg ) |
Sets a profile's own line segment number, given a line segment and the index of the co-incident profile for that line segment.
Definition at line 261 of file multi_line.cpp.
Referenced by CSimulation::TruncateProfileAndAppendNew().
void CGeomMultiLine::TruncateLineSegments | ( | int const | nSize | ) |
Cuts short the number of line segments.
Definition at line 79 of file multi_line.cpp.
Referenced by CSimulation::CreateRasterizedProfile(), and CSimulation::TruncateProfileAndAppendNew().
A vector of line segments, each element is a vector of pairs. The first of the pair is a co-incident profile number, the second is that profile's 'own' line segment number.
Definition at line 38 of file multi_line.h.
Referenced by AddCoincidentProfileToExistingLineSegment(), AppendCoincidentProfileToLineSegments(), AppendLineSegment(), AppendLineSegment(), bFindProfileInCoincidentProfiles(), bFindProfileInCoincidentProfilesOfLastLineSegment(), GetMostCoastwardSharedLineSegment(), InsertLineSegment(), nGetCoincidentProfileForLineSegment(), nGetNumCoincidentProfilesInLineSegment(), nGetNumLineSegments(), nGetProf(), nGetProfsLineSeg(), pprVGetPairedCoincidentProfilesForLineSegment(), prVVGetAllLineSegAfter(), RemoveLineSegment(), SetProfsLineSeg(), and TruncateLineSegments().