CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
2di_shape.h
Go to the documentation of this file.
1
12
13#ifndef C2DISHAPE_H
14#define C2DISHAPE_H
15/* ===============================================================================================================================
16 This file is part of CoastalME, the Coastal Modelling Environment.
17
18 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23===============================================================================================================================*/
24#include <vector>
25using std::vector;
26
27#include "2di_point.h"
28
30{
31 private:
32 protected:
34 vector<CGeom2DIPoint> m_VPoints;
35
36 CA2DIShape(void);
37 virtual ~CA2DIShape(void);
38
39 void Clear(void);
40
41 virtual void Display() = 0;
42
43 public:
44 CGeom2DIPoint& operator[](int const);
45
46 CGeom2DIPoint& Back(void);
47 vector<CGeom2DIPoint>* pPtiVGetPoints(void);
48
49 void Resize(const int);
50 int nGetSize(void) const;
51
52 // void InsertAtFront(int const, int const);
53 void Append(CGeom2DIPoint const*);
54 void Append(int const, int const);
55 void AppendIfNotPrevious(int const, int const);
57
58 // void SetPoints(const vector<CGeom2DIPoint>*);
59 // int nLookUp(CGeom2DIPoint*);
60};
61#endif // C2DISHAPE_H
Contains CGeom2DIPoint definitions.
int nGetSize(void) const
Returns the number of integer point in the vector which represents this 2D shape.
Definition 2di_shape.cpp:65
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 no...
Definition 2di_shape.cpp:88
vector< CGeom2DIPoint > m_VPoints
The integer points which comprise the integer-coordinate 2D shape.
Definition 2di_shape.h:34
virtual ~CA2DIShape(void)
Destructor.
Definition 2di_shape.cpp:29
void Resize(const int)
Resizes the vector which represents this 2D shape.
Definition 2di_shape.cpp:59
CGeom2DIPoint & Back(void)
Returns the last integer point from the vector which represents this 2D shape.
Definition 2di_shape.cpp:41
void Clear(void)
Clears the vector which represents this 2D shape.
Definition 2di_shape.cpp:53
CA2DIShape(void)
Constructor, no parameters.
Definition 2di_shape.cpp:24
virtual void Display()=0
void Append(CGeom2DIPoint const *)
Appends a new integer point to the vector which represents this 2D shape.
Definition 2di_shape.cpp:76
CGeom2DIPoint & operator[](int const)
Returns one integer point from the vector which represents this 2D shape.
Definition 2di_shape.cpp:34
vector< CGeom2DIPoint > * pPtiVGetPoints(void)
Returns the address of the vector which represents this 2D shape.
Definition 2di_shape.cpp:47
Geometry class used to represent 2D point objects with integer coordinates.
Definition 2di_point.h:25