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
14
15#ifndef C2DISHAPE_H
16#define C2DISHAPE_H
17/* ===============================================================================================================================
18
19 This file is part of CoastalME, the Coastal Modelling Environment.
20
21 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.
22
23 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.
24
25 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.
26
27===============================================================================================================================*/
28#include <vector>
29using std::vector;
30
31#include "2di_point.h"
32
34{
35 private:
36 protected:
38 vector<CGeom2DIPoint> m_VPoints;
39
40 CA2DIShape(void);
41 virtual ~CA2DIShape(void);
42
43 void Clear(void);
44
45 virtual void Display() = 0;
46
47 public:
48 CGeom2DIPoint& operator[](int const);
49
50 CGeom2DIPoint& Back(void);
51 vector<CGeom2DIPoint>* pPtiVGetPoints(void);
52
53 void Resize(const int);
54 int nGetSize(void) const;
55
56 // void InsertAtFront(int const, int const);
57 void Append(CGeom2DIPoint const*);
58 void Append(int const, int const);
59 void AppendIfNotAlready(int const, int const);
60
61 // void SetPoints(const vector<CGeom2DIPoint>*);
62 // int nLookUp(CGeom2DIPoint*);
63};
64#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:69
vector< CGeom2DIPoint > m_VPoints
The integer points which comprise the integer-coordinate 2D shape.
Definition 2di_shape.h:38
virtual ~CA2DIShape(void)
Destructor.
Definition 2di_shape.cpp:33
void Resize(const int)
Resizes the vector which represents this 2D shape.
Definition 2di_shape.cpp:63
CGeom2DIPoint & Back(void)
Returns the last integer point from the vector which represents this 2D shape.
Definition 2di_shape.cpp:45
void Clear(void)
Clears the vector which represents this 2D shape.
Definition 2di_shape.cpp:57
CA2DIShape(void)
Constructor, no parameters.
Definition 2di_shape.cpp:28
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 no...
Definition 2di_shape.cpp:92
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:80
CGeom2DIPoint & operator[](int const)
Returns one integer point from the vector which represents this 2D shape.
Definition 2di_shape.cpp:38
vector< CGeom2DIPoint > * pPtiVGetPoints(void)
Returns the address of the vector which represents this 2D shape.
Definition 2di_shape.cpp:51
Geometry class used to represent 2D point objects with integer coordinates.
Definition 2di_point.h:29