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

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

#include <2di_shape.h>

Inherited by CGeomILine.

Public Member Functions

CGeom2DIPointoperator[] (int const)
 Returns one integer point from the vector which represents this 2D shape.
 
CGeom2DIPointBack (void)
 Returns the last integer point from the vector which represents this 2D shape.
 
vector< CGeom2DIPoint > * pPtiVGetPoints (void)
 Returns the address of the vector which represents this 2D shape.
 
void Resize (const int)
 Resizes the vector which represents this 2D shape.
 
int nGetSize (void) const
 Returns the number of integer point in the vector which represents this 2D shape.
 
void Append (CGeom2DIPoint const *)
 Appends a new integer point to the vector which represents this 2D shape.
 
void Append (int const, int const)
 Appends a new integer point to the vector which represents this 2D shape.
 
void AppendIfNotAlready (int const, int const)
 Appends a new integer point to the vector which represents this 2D shape, but only if the point is not already present.
 

Protected Member Functions

 CA2DIShape (void)
 Constructor, no parameters.
 
virtual ~CA2DIShape (void)
 Destructor.
 
void Clear (void)
 Clears the vector which represents this 2D shape.
 
virtual void Display ()=0
 

Protected Attributes

vector< CGeom2DIPointm_VPoints
 The integer points which comprise the integer-coordinate 2D shape.
 

Detailed Description

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

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

Author
David Favis-Mortlock
Andres Payo
Date
2025

Definition at line 33 of file 2di_shape.h.

Constructor & Destructor Documentation

◆ CA2DIShape()

CA2DIShape::CA2DIShape ( void )
protected

Constructor, no parameters.

Definition at line 29 of file 2di_shape.cpp.

◆ ~CA2DIShape()

CA2DIShape::~CA2DIShape ( void )
protectedvirtual

Destructor.

Definition at line 34 of file 2di_shape.cpp.

Member Function Documentation

◆ Append() [1/2]

void CA2DIShape::Append ( CGeom2DIPoint const * pPtiNew)

Appends a new integer point to the vector which represents this 2D shape.

Definition at line 81 of file 2di_shape.cpp.

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

◆ Append() [2/2]

void CA2DIShape::Append ( int const nX,
int const nY )

Appends a new integer point to the vector which represents this 2D shape.

Definition at line 87 of file 2di_shape.cpp.

◆ AppendIfNotAlready()

void CA2DIShape::AppendIfNotAlready ( int const nX,
int const nY )

Appends a new integer point to the vector which represents this 2D shape, but only if the point is not already present.

Definition at line 93 of file 2di_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

◆ Back()

CGeom2DIPoint & CA2DIShape::Back ( void )

Returns the last integer point from the vector which represents this 2D shape.

Definition at line 46 of file 2di_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

◆ Clear()

void CA2DIShape::Clear ( void )
protected

Clears the vector which represents this 2D shape.

Definition at line 58 of file 2di_shape.cpp.

◆ Display()

virtual void CA2DIShape::Display ( )
protectedpure virtual

Implemented in CGeomILine.

◆ nGetSize()

int CA2DIShape::nGetSize ( void ) const

Returns the number of integer point in the vector which represents this 2D shape.

Definition at line 70 of file 2di_shape.cpp.

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

◆ operator[]()

CGeom2DIPoint & CA2DIShape::operator[] ( int const n)

Returns one integer point from the vector which represents this 2D shape.

Definition at line 39 of file 2di_shape.cpp.

◆ pPtiVGetPoints()

vector< CGeom2DIPoint > * CA2DIShape::pPtiVGetPoints ( void )

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

Definition at line 52 of file 2di_shape.cpp.

Referenced by CSimulation::nDoAllShadowZones().

◆ Resize()

void CA2DIShape::Resize ( const int nSize)

Resizes the vector which represents this 2D shape.

Definition at line 64 of file 2di_shape.cpp.

Field Documentation

◆ m_VPoints

vector<CGeom2DIPoint> CA2DIShape::m_VPoints
protected

The integer points which comprise the integer-coordinate 2D shape.

Definition at line 39 of file 2di_shape.h.

Referenced by Append(), Append(), AppendIfNotAlready(), Back(), CGeomILine::bIsPresent(), Clear(), nGetSize(), operator[](), pPtiVGetPoints(), and Resize().


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