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

Geometry class used to represent 2D vector line objects. More...

#include <line.h>

Inherits CA2DShape.

Inherited by CGeomMultiLine.

Public Member Functions

 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.
 
CGeom2DPointpPtGetAt (int const)
 Returns the point at a given place in the line.
 
- Public Member Functions inherited from CA2DShape
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.
 
CGeom2DPointpPtBack (void)
 Returns the last element of this 2D shape.
 
CGeom2DPointoperator[] (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.
 

Protected Member Functions

void Display (void) override
 Instantiates the pure virtual function in the abstract parent class, so that CGeomLine is not an abstract class.
 
- Protected Member Functions inherited from CA2DShape
 CA2DShape (void)
 Constructor.
 
virtual ~CA2DShape (void)
 Destructor.
 
void Clear (void)
 Clears this 2D shape.
 

Additional Inherited Members

- Protected Attributes inherited from CA2DShape
vector< CGeom2DPointm_VPoints
 The points which comprise the float-coordinate 2D shape.
 

Detailed Description

Geometry class used to represent 2D vector line objects.

TODO 001 This is a more detailed description of the CGeomLine class.

Author
David Favis-Mortlock
Andres Payo
Date
2025

Definition at line 30 of file line.h.

Constructor & Destructor Documentation

◆ CGeomLine() [1/3]

CGeomLine::CGeomLine ( void )

Constructor.

Definition at line 34 of file line.cpp.

◆ CGeomLine() [2/3]

CGeomLine::CGeomLine ( CGeom2DPoint const * pPt1,
CGeom2DPoint const * pPt2 )

Overloaded constructor with two points as parameters.

Definition at line 39 of file line.cpp.

◆ CGeomLine() [3/3]

CGeomLine::CGeomLine ( int const nNum)
explicit

Overloaded constructor with one parameter, this creates a given number of uninitialized points.

Definition at line 46 of file line.cpp.

◆ ~CGeomLine()

CGeomLine::~CGeomLine ( void )
override

Destructor.

Definition at line 55 of file line.cpp.

Member Function Documentation

◆ dGetXAt()

double CGeomLine::dGetXAt ( int const n)

Returns the X value at a given place in the line.

Definition at line 60 of file line.cpp.

Referenced by CSimulation::bWriteVectorGISFile(), CSimulation::LSmoothCoastRunningMean(), and CSimulation::LSmoothCoastSavitzkyGolay().

◆ dGetYAt()

double CGeomLine::dGetYAt ( int const n)

Returns the Y value at a given place in the line.

Definition at line 66 of file line.cpp.

Referenced by CSimulation::bWriteVectorGISFile(), CSimulation::LSmoothCoastRunningMean(), and CSimulation::LSmoothCoastSavitzkyGolay().

◆ Display()

void CGeomLine::Display ( void )
overrideprotectedvirtual

Instantiates the pure virtual function in the abstract parent class, so that CGeomLine is not an abstract class.

Implements CA2DShape.

Definition at line 98 of file line.cpp.

◆ pPtGetAt()

CGeom2DPoint * CGeomLine::pPtGetAt ( int const n)

Returns the point at a given place in the line.

Definition at line 72 of file line.cpp.

Referenced by CSimulation::LSmoothCoastRunningMean(), and CSimulation::LSmoothCoastSavitzkyGolay().


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