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