CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
|
Geometry class used to represent 2D point objects with integer coordinates. More...
#include <2di_point.h>
Public Member Functions | |
CGeom2DIPoint (void) | |
Constructor with no parameters (the X and Y coordinates of the CGeom2DIPoint object are set to zero in an initialization list) | |
CGeom2DIPoint (int const, int const) | |
Constructor with two integer parameters, for the X and Y coordinates of the CGeom2DIPoint object. | |
int | nGetX (void) const |
Returns the CGeom2DIPoint object's integer X coordinate. | |
int | nGetY (void) const |
Returns the CGeom2DIPoint object's integer Y coordinate. | |
int * | pnGetX () |
Returns a reference to the CGeom2DIPoint object's integer X coordinate. | |
int * | pnGetY () |
Returns a reference to the CGeom2DIPoint object's integer Y coordinate. | |
void | SetX (int const) |
The integer parameter sets a value for the CGeom2DIPoint object's X coordinate. | |
void | SetY (int const) |
The integer parameter sets a value for the CGeom2DIPoint object's Y coordinate. | |
void | SetXY (int const, int const) |
The two integer parameters set values for the CGeom2DIPoint object's X and Y coordinates. | |
void | AddXAddY (int const, int const) |
The parameter is a pointer to a CGeom2DIPoint object, this is used to set values for the CGeom2DIPoint object's X and Y coordinates. | |
void | AddXAddY (double const, double const) |
Adds the first double parameter (rounded) to the CGeom2DIPoint object's X coordinate, adds the second double parameter (rounded) to the CGeom2DIPoint object's Y coordinate. | |
void | DivXDivY (double const, double const) |
Divides the CGeom2DIPoint object's X coordinate by the first double parameter (rounded), divides the CGeom2DIPoint object's Y coordinate by the second double parameter (rounded) | |
void | operator= (CGeom2DIPoint const *) |
Sets one CGeom2DIPoint object to be the same as another. | |
bool | operator== (CGeom2DIPoint const *) const |
Compares two CGeom2DIPoint objects for equality. | |
bool | operator== (CGeom2DIPoint) const |
Compares two CGeom2DIPoint objects for equality. | |
bool | operator!= (CGeom2DIPoint const *) const |
Compares two CGeom2DIPoint objects for inequality. | |
bool | operator!= (CGeom2DIPoint) const |
Compares two CGeom2DIPoint objects for inequality. | |
Private Attributes | |
int | nX |
The integer x coordinate. | |
int | nY |
The integer y coordinate. | |
Geometry class used to represent 2D point objects with integer coordinates.
The CGeom2DIPoint geometry class is used to represent 2D points where the x and y coordinates are integer values (e.g. for the raster grid coordinate reference system)
Definition at line 28 of file 2di_point.h.
CGeom2DIPoint::CGeom2DIPoint | ( | void | ) |
Constructor with no parameters (the X and Y coordinates of the CGeom2DIPoint object are set to zero in an initialization list)
Definition at line 28 of file 2di_point.cpp.
Referenced by operator!=(), operator!=(), operator=(), operator==(), and operator==().
CGeom2DIPoint::CGeom2DIPoint | ( | int const | nNewX, |
int const | nNewY ) |
Constructor with two integer parameters, for the X and Y coordinates of the CGeom2DIPoint object.
Definition at line 35 of file 2di_point.cpp.
void CGeom2DIPoint::AddXAddY | ( | double const | dXToAdd, |
double const | dYToAdd ) |
Adds the first double parameter (rounded) to the CGeom2DIPoint object's X coordinate, adds the second double parameter (rounded) to the CGeom2DIPoint object's Y coordinate.
Definition at line 99 of file 2di_point.cpp.
void CGeom2DIPoint::AddXAddY | ( | int const | nXToAdd, |
int const | nYToAdd ) |
The parameter is a pointer to a CGeom2DIPoint object, this is used to set values for the CGeom2DIPoint object's X and Y coordinates.
Adds the first integer parameter to the CGeom2DIPoint object's X coordinate, adds the second integer parameter to the CGeom2DIPoint object's Y coordinate
Definition at line 92 of file 2di_point.cpp.
Referenced by CSimulation::PtiPolygonCentroid().
void CGeom2DIPoint::DivXDivY | ( | double const | dXDiv, |
double const | dYDiv ) |
Divides the CGeom2DIPoint object's X coordinate by the first double parameter (rounded), divides the CGeom2DIPoint object's Y coordinate by the second double parameter (rounded)
Definition at line 106 of file 2di_point.cpp.
Referenced by CSimulation::PtiPolygonCentroid().
int CGeom2DIPoint::nGetX | ( | void | ) | const |
Returns the CGeom2DIPoint object's integer X coordinate.
Definition at line 42 of file 2di_point.cpp.
Referenced by CSimulation::AppendEnsureNoGap(), CSimulation::bIsWithinValidGrid(), CSimulation::CreateRasterizedProfile(), CSimulation::dAngleSubtended(), CSimulation::dGetDistanceBetween(), CSimulation::DoShadowZoneAndDownDriftZone(), CSimulation::FloodFillLand(), CSimulation::FloodFillSea(), CSimulation::KeepWithinValidGrid(), CSimulation::LSmoothCoastRunningMean(), CSimulation::LSmoothCoastSavitzkyGolay(), CSimulation::MarkPolygonCells(), CSimulation::ModifyBreakingWavePropertiesWithinShadowZoneToCoastline(), CSimulation::nCalcWavePropertiesOnProfile(), CSimulation::nCheckAllProfiles(), CSimulation::nCreateAllPolygons(), CSimulation::nCreateProfile(), CSimulation::nDoAllShadowZones(), CSimulation::nDoCliffCollapse(), CSimulation::nDoCliffCollapseDeposition(), CSimulation::nDoParallelProfileUnconsErosion(), CSimulation::nDoSedimentInputEvent(), CSimulation::nDoUnconsDepositionOnPolygon(), CSimulation::nDoUnconsErosionOnPolygon(), CSimulation::nFloodFillShadowZone(), CSimulation::nGetCoastNormalEndPoint(), CRWCoast::nGetCoastPointGivenCell(), CSimulation::nLocateAndCreateGridEdgeProfile(), operator!=(), operator!=(), operator=(), operator==(), operator==(), CSimulation::PtGridCentroidToExt(), CSimulation::PtiFollowWaveAngle(), CSimulation::PtiGetPerpendicular(), CSimulation::PtiWeightedAverage(), and CSimulation::RasterizePolygonJoiningLine().
int CGeom2DIPoint::nGetY | ( | void | ) | const |
Returns the CGeom2DIPoint object's integer Y coordinate.
Definition at line 48 of file 2di_point.cpp.
Referenced by CSimulation::AppendEnsureNoGap(), CSimulation::bIsWithinValidGrid(), CSimulation::CreateRasterizedProfile(), CSimulation::dAngleSubtended(), CSimulation::dGetDistanceBetween(), CSimulation::DoShadowZoneAndDownDriftZone(), CSimulation::FloodFillLand(), CSimulation::FloodFillSea(), CSimulation::KeepWithinValidGrid(), CSimulation::LSmoothCoastRunningMean(), CSimulation::LSmoothCoastSavitzkyGolay(), CSimulation::MarkPolygonCells(), CSimulation::ModifyBreakingWavePropertiesWithinShadowZoneToCoastline(), CSimulation::nCalcWavePropertiesOnProfile(), CSimulation::nCheckAllProfiles(), CSimulation::nCreateAllPolygons(), CSimulation::nCreateProfile(), CSimulation::nDoAllShadowZones(), CSimulation::nDoCliffCollapse(), CSimulation::nDoCliffCollapseDeposition(), CSimulation::nDoParallelProfileUnconsErosion(), CSimulation::nDoSedimentInputEvent(), CSimulation::nDoUnconsDepositionOnPolygon(), CSimulation::nDoUnconsErosionOnPolygon(), CSimulation::nFloodFillShadowZone(), CSimulation::nGetCoastNormalEndPoint(), CRWCoast::nGetCoastPointGivenCell(), CSimulation::nLocateAndCreateGridEdgeProfile(), operator!=(), operator!=(), operator=(), operator==(), operator==(), CSimulation::PtGridCentroidToExt(), CSimulation::PtiFollowWaveAngle(), CSimulation::PtiGetPerpendicular(), CSimulation::PtiWeightedAverage(), and CSimulation::RasterizePolygonJoiningLine().
bool CGeom2DIPoint::operator!= | ( | CGeom2DIPoint const * | pPti | ) | const |
Compares two CGeom2DIPoint objects for inequality.
Definition at line 146 of file 2di_point.cpp.
bool CGeom2DIPoint::operator!= | ( | CGeom2DIPoint | Pti | ) | const |
Compares two CGeom2DIPoint objects for inequality.
Definition at line 155 of file 2di_point.cpp.
void CGeom2DIPoint::operator= | ( | CGeom2DIPoint const * | pPti | ) |
Sets one CGeom2DIPoint object to be the same as another.
Definition at line 121 of file 2di_point.cpp.
bool CGeom2DIPoint::operator== | ( | CGeom2DIPoint const * | pPti | ) | const |
Compares two CGeom2DIPoint objects for equality.
Definition at line 128 of file 2di_point.cpp.
bool CGeom2DIPoint::operator== | ( | CGeom2DIPoint | Pti | ) | const |
Compares two CGeom2DIPoint objects for equality.
Definition at line 137 of file 2di_point.cpp.
int * CGeom2DIPoint::pnGetX | ( | void | ) |
Returns a reference to the CGeom2DIPoint object's integer X coordinate.
Definition at line 54 of file 2di_point.cpp.
Referenced by CSimulation::KeepWithinValidGrid().
int * CGeom2DIPoint::pnGetY | ( | void | ) |
Returns a reference to the CGeom2DIPoint object's integer Y coordinate.
Definition at line 60 of file 2di_point.cpp.
Referenced by CSimulation::KeepWithinValidGrid().
void CGeom2DIPoint::SetX | ( | int const | nNewX | ) |
The integer parameter sets a value for the CGeom2DIPoint object's X coordinate.
Definition at line 66 of file 2di_point.cpp.
Referenced by CSimulation::DoShadowZoneAndDownDriftZone(), CSimulation::nDoParallelProfileUnconsErosion(), CSimulation::nDoUnconsDepositionOnPolygon(), CSimulation::PtiGetPerpendicular(), and CSimulation::PtiGetPerpendicular().
void CGeom2DIPoint::SetXY | ( | int const | nNewX, |
int const | nNewY ) |
The two integer parameters set values for the CGeom2DIPoint object's X and Y coordinates.
Definition at line 78 of file 2di_point.cpp.
Referenced by CSimulation::nGetCoastNormalEndPoint(), and CSimulation::PtiFindClosestCoastPoint().
void CGeom2DIPoint::SetY | ( | int const | nNewY | ) |
The integer parameter sets a value for the CGeom2DIPoint object's Y coordinate.
Definition at line 72 of file 2di_point.cpp.
Referenced by CSimulation::DoShadowZoneAndDownDriftZone(), CSimulation::nDoParallelProfileUnconsErosion(), CSimulation::nDoUnconsDepositionOnPolygon(), CSimulation::PtiGetPerpendicular(), and CSimulation::PtiGetPerpendicular().
|
private |
The integer x coordinate.
Definition at line 32 of file 2di_point.h.
Referenced by AddXAddY(), AddXAddY(), CGeom2DIPoint(), CGeom2DIPoint(), DivXDivY(), nGetX(), operator!=(), operator!=(), operator=(), operator==(), operator==(), pnGetX(), SetX(), and SetXY().
|
private |
The integer y coordinate.
Definition at line 35 of file 2di_point.h.
Referenced by AddXAddY(), AddXAddY(), CGeom2DIPoint(), CGeom2DIPoint(), DivXDivY(), nGetY(), operator!=(), operator!=(), operator=(), operator==(), operator==(), pnGetY(), SetXY(), and SetY().