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

Abstract class, used as a base class for 2D objects (line, area, etc.) More...

#include <2d_shape.h>

Inherited by CGeomCoastPolygon, and CGeomLine.

Public Member Functions

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 AppendIfNotPrevious (double const, double const)
 Appends a point to this 2D shape only if the point is not the same as the previous point in the 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

 CA2DShape (void)
 Constructor.
 
virtual ~CA2DShape (void)
 Destructor.
 
virtual void Display ()=0
 

Protected Attributes

vector< CGeom2DPointm_VPoints
 The points which comprise the float-coordinate 2D shape.
 

Detailed Description

Abstract class, used as a base class for 2D objects (line, area, etc.)

Abstract class, used as a base class for 2D objects (line, area, etc.)

Author
David Favis-Mortlock
Andres Payo
Date
2025

Definition at line 32 of file 2d_shape.h.

Constructor & Destructor Documentation

◆ CA2DShape()

CA2DShape::CA2DShape ( void )
protected

Constructor.

Definition at line 24 of file 2d_shape.cpp.

◆ ~CA2DShape()

CA2DShape::~CA2DShape ( void )
protectedvirtual

Destructor.

Definition at line 29 of file 2d_shape.cpp.

Member Function Documentation

◆ Append() [1/2]

◆ Append() [2/2]

void CA2DShape::Append ( double const dX,
double const dY )

Appends a point to this 2D shape.

Definition at line 70 of file 2d_shape.cpp.

◆ AppendIfNotPrevious()

void CA2DShape::AppendIfNotPrevious ( double const dX,
double const dY )

Appends a point to this 2D shape only if the point is not the same as the previous point in the vector.

Definition at line 76 of file 2d_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

◆ Display()

virtual void CA2DShape::Display ( )
protectedpure virtual

Implemented in CGeomCoastPolygon, and CGeomLine.

◆ nGetSize()

◆ operator[]()

CGeom2DPoint & CA2DShape::operator[] ( int const n)

Operator to return one point of this 2D shape.

Definition at line 34 of file 2d_shape.cpp.

◆ pPtBack()

CGeom2DPoint * CA2DShape::pPtBack ( void )

Returns the last element of this 2D shape.

Definition at line 88 of file 2d_shape.cpp.

Referenced by CSimulation::DoShadowZoneAndDownDriftZone().

◆ pPtVGetPoints()

vector< CGeom2DPoint > * CA2DShape::pPtVGetPoints ( void )

Returns the address of the vector which represents this 2D shape.

Definition at line 127 of file 2d_shape.cpp.

Referenced by CSimulation::bCheckForIntersection().

◆ Resize()

void CA2DShape::Resize ( int const nSize)

Resizes the vector which represents this 2D shape.

Definition at line 47 of file 2d_shape.cpp.

Referenced by CSimulation::LSmoothCoastSavitzkyGolay().

◆ Reverse()

void CA2DShape::Reverse ( void )

Reverses the sequence of points in the vector which represents this 2D polygon.

Definition at line 163 of file 2d_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

Field Documentation

◆ m_VPoints


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