"Fossies" - the Fresh Open Source Software Archive

Member "saga-9.0.2/saga-gis/src/tools/terrain_analysis/ta_cliffmetrics/CliffMetrics/2d_shape.h" (25 May 2023, 2096 Bytes) of package /linux/misc/saga-9.0.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*!
    2  *
    3  * \class C2DShape
    4  * \brief Abstract class, used as a base class for 2D objects (line, area, etc.)
    5  * \details TODO This is a more detailed description of the C2DShape abstract class.
    6  * \author David Favis-Mortlock
    7  * \author Andres Payo
    8  * \author Jim Hall
    9  * \date 2017
   10  * \copyright GNU General Public License
   11  *
   12  * \file 2dshape.h
   13  * \brief Contains C2DShape definitions
   14  *
   15  */
   16 
   17 #ifndef C2DSHAPE_H
   18 #define C2DSHAPE_H
   19 /*===============================================================================================================================
   20 
   21  This file is part of CliffMetrics, the Coastal Modelling Environment.
   22 
   23  CliffMetrics 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.
   24 
   25  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.
   26 
   27  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.
   28 
   29 ===============================================================================================================================*/
   30 #include <vector>
   31 using std::vector;
   32 
   33 #include "2d_point.h"
   34 
   35 
   36 class C2DShape
   37 {
   38 protected:
   39     vector<C2DPoint> m_VPoints;
   40 
   41 public:
   42    C2DShape(void);
   43    virtual ~C2DShape(void);
   44    C2DPoint& operator[] (int const);
   45    void Clear(void);
   46    void Resize(int const);
   47 //    void InsertAtFront(double const, double const);
   48    void Append(const C2DPoint*);
   49    void Append(double const, double const);
   50    int nGetSize(void) const;
   51 //    void SetPoints(const vector<C2DPoint>*);
   52 //    int nLookUp(C2DPoint*);
   53 //    double dGetLength(void) const;
   54    vector<C2DPoint>* pPtVGetPoints(void);
   55 
   56    C2DPoint PtGetCentroid(void);
   57 
   58    virtual void Display() = 0;
   59 };
   60 #endif // C2DSHAPE_H
   61