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 AppendIfNotPrevious (int const, int const)
 Appends a new integer point to the vector which represents this 2D shape, but only if the point is not the same as the previous point in the vector.
 
void AppendIfNotPrevious (CGeom2DIPoint const *)
 Appends a new integer point to the vector which represents this 2D shape, but only if the point is not the same as the previous point in the vector.
 

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 29 of file 2di_shape.h.

Constructor & Destructor Documentation

◆ CA2DIShape()

CA2DIShape::CA2DIShape ( void )
protected

Constructor, no parameters.

Definition at line 24 of file 2di_shape.cpp.

◆ ~CA2DIShape()

CA2DIShape::~CA2DIShape ( void )
protectedvirtual

Destructor.

Definition at line 29 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 76 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 82 of file 2di_shape.cpp.

◆ AppendIfNotPrevious() [1/2]

void CA2DIShape::AppendIfNotPrevious ( CGeom2DIPoint const * pPtiIn)

Appends a new integer point to the vector which represents this 2D shape, but only if the point is not the same as the previous point in the vector.

Definition at line 100 of file 2di_shape.cpp.

◆ AppendIfNotPrevious() [2/2]

void CA2DIShape::AppendIfNotPrevious ( 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 the same as the previous point in the vector.

Definition at line 88 of file 2di_shape.cpp.

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

◆ Back()

CGeom2DIPoint & CA2DIShape::Back ( void )

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

Definition at line 41 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 53 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 65 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 34 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 47 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 59 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 34 of file 2di_shape.h.

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


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