CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
CGeom2DPoint Class Reference

Geometry class used to represent 2D point objects with floating-point coordinates. More...

#include <2d_point.h>

Public Member Functions

 CGeom2DPoint (void)
 Constructor with no parameters (the X and Y coordinates of the CGeom2DPoint object are set to zero)
 
 CGeom2DPoint (double const, double const)
 Constructor with two double parameters, for the X and Y coordinates of the CGeom2DPoint object.
 
double dGetX (void) const
 Returns the CGeom2DPoint object's double X coordinate.
 
double dGetY (void) const
 Returns the CGeom2DPoint object's double Y coordinate.
 
void SetX (double const)
 The double parameter sets a value for the CGeom2DIPoint object's X coordinate.
 
void SetY (double const)
 The double parameter sets a value for the CGeom2DIPoint object's Y coordinate.
 
void operator= (CGeom2DPoint const *)
 Sets one CGeom2DPoint object equal to another.
 
bool operator== (CGeom2DPoint const *) const
 Compares two CGeom2DPoint pointed-to objects for equality.
 
bool operator== (CGeom2DPoint) const
 Compares two CGeom2DPoint objects for equality.
 
bool operator!= (CGeom2DPoint const *) const
 Compares two CGeom2DPoint pointed-to objects for inequality.
 
bool operator!= (CGeom2DPoint) const
 Compares two CGeom2DPoint objects for inequality.
 

Private Attributes

double dX
 The x coordinate.
 
double dY
 The y coordinate.
 

Detailed Description

Geometry class used to represent 2D point objects with floating-point coordinates.

The CGeom2DPoint geometry class is used to represent 2D points where the x and y coordinates are floating-point values

Author
David Favis-Mortlock
Andres Payo
Date
2025

Definition at line 26 of file 2d_point.h.

Constructor & Destructor Documentation

◆ CGeom2DPoint() [1/2]

CGeom2DPoint::CGeom2DPoint ( void )

Constructor with no parameters (the X and Y coordinates of the CGeom2DPoint object are set to zero)

Definition at line 26 of file 2d_point.cpp.

Referenced by operator!=(), operator!=(), operator=(), operator==(), and operator==().

◆ CGeom2DPoint() [2/2]

CGeom2DPoint::CGeom2DPoint ( double const dNewX,
double const dNewY )

Constructor with two double parameters, for the X and Y coordinates of the CGeom2DPoint object.

Definition at line 33 of file 2d_point.cpp.

Member Function Documentation

◆ dGetX()

◆ dGetY()

◆ operator!=() [1/2]

bool CGeom2DPoint::operator!= ( CGeom2DPoint const * pPt) const

Compares two CGeom2DPoint pointed-to objects for inequality.

Definition at line 102 of file 2d_point.cpp.

◆ operator!=() [2/2]

bool CGeom2DPoint::operator!= ( CGeom2DPoint Pt) const

Compares two CGeom2DPoint objects for inequality.

Definition at line 111 of file 2d_point.cpp.

◆ operator=()

void CGeom2DPoint::operator= ( CGeom2DPoint const * pPt)

Sets one CGeom2DPoint object equal to another.

Definition at line 77 of file 2d_point.cpp.

◆ operator==() [1/2]

bool CGeom2DPoint::operator== ( CGeom2DPoint const * pPt) const

Compares two CGeom2DPoint pointed-to objects for equality.

Definition at line 84 of file 2d_point.cpp.

◆ operator==() [2/2]

bool CGeom2DPoint::operator== ( CGeom2DPoint Pt) const

Compares two CGeom2DPoint objects for equality.

Definition at line 93 of file 2d_point.cpp.

◆ SetX()

void CGeom2DPoint::SetX ( double const dNewX)

◆ SetY()

void CGeom2DPoint::SetY ( double const dNewY)

Field Documentation

◆ dX

double CGeom2DPoint::dX
private

The x coordinate.

Definition at line 30 of file 2d_point.h.

Referenced by CGeom2DPoint(), CGeom2DPoint(), dGetX(), operator!=(), operator!=(), operator=(), operator==(), operator==(), and SetX().

◆ dY

double CGeom2DPoint::dY
private

The y coordinate.

Definition at line 33 of file 2d_point.h.

Referenced by CGeom2DPoint(), CGeom2DPoint(), dGetY(), operator!=(), operator!=(), operator=(), operator==(), operator==(), and SetY().


The documentation for this class was generated from the following files: