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 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

 CA2DShape (void)
 Constructor.
 
virtual ~CA2DShape (void)
 Destructor.
 
void Clear (void)
 Clears this 2D shape.
 
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 34 of file 2d_shape.h.

Constructor & Destructor Documentation

◆ CA2DShape()

CA2DShape::CA2DShape ( void )
protected

Constructor.

Definition at line 27 of file 2d_shape.cpp.

◆ ~CA2DShape()

CA2DShape::~CA2DShape ( void )
protectedvirtual

Destructor.

Definition at line 32 of file 2d_shape.cpp.

Member Function Documentation

◆ Append() [1/2]

void CA2DShape::Append ( CGeom2DPoint const * pPtNew)

Appends a point to this 2D shape.

Definition at line 67 of file 2d_shape.cpp.

Referenced by CSimulation::DoShadowZoneAndDownDriftZone(), CSimulation::nTraceCoastLine(), and CSimulation::nTraceFloodCoastLine().

◆ Append() [2/2]

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

Appends a point to this 2D shape.

Definition at line 73 of file 2d_shape.cpp.

◆ AppendIfNotAlready()

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

Appends a point to this 2D shape only if it isn't already in the shape vector.

Definition at line 79 of file 2d_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

◆ Clear()

void CA2DShape::Clear ( void )
protected

Clears this 2D shape.

Definition at line 44 of file 2d_shape.cpp.

◆ 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 37 of file 2d_shape.cpp.

◆ pPtBack()

CGeom2DPoint * CA2DShape::pPtBack ( void )

Returns the last element of this 2D shape.

Definition at line 91 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 130 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 50 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 166 of file 2d_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

Field Documentation

◆ m_VPoints


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