QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
ParametricLine.h
Go to the documentation of this file.
1/***************************************************************************
2 ParametricLine.h - description
3 -------------------
4 copyright : (C) 2004 by Marco Hugentobler
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef PARAMETRICLINE_H
18#define PARAMETRICLINE_H
19
20#include "qgspoint.h"
21#include <QVector>
22#include "qgis_analysis.h"
23#include "qgis_sip.h"
24
25class Vector3D;
26
27#define SIP_NO_FILE
28
37class ANALYSIS_EXPORT ParametricLine
38{
39 protected:
41 int mDegree = 0;
43 ParametricLine *mParent = nullptr;
45 QVector<QgsPoint *> *mControlPoly = nullptr;
46 public:
47
48 ParametricLine() = default;
49
53 ParametricLine( ParametricLine *par SIP_TRANSFER, QVector<QgsPoint *> *controlpoly );
54 virtual ~ParametricLine() = default;
55 virtual void add( ParametricLine *pl SIP_TRANSFER ) = 0;
56 virtual void calcFirstDer( float t, Vector3D *v SIP_OUT ) = 0;
57 virtual void calcSecDer( float t, Vector3D *v SIP_OUT ) = 0;
58 //virtual QgsPoint calcPoint(float t);
59 virtual void calcPoint( float t, QgsPoint *p SIP_OUT ) = 0;
60 virtual void changeDirection() = 0;
61 //virtual void draw(QPainter* p);
62 virtual const QgsPoint *getControlPoint( int number ) const = 0;
63 virtual const QVector<QgsPoint *> *getControlPoly() const = 0;
64 virtual int getDegree() const = 0;
65 virtual ParametricLine *getParent() const = 0;
66 //virtual bool intersects(ParametricLine* pal);
67 virtual void remove( int i ) = 0;
68 virtual void setControlPoly( QVector<QgsPoint *> *cp ) = 0;
69 virtual void setParent( ParametricLine *paral ) = 0;
70};
71
72#ifndef SIP_RUN
73
74//-----------------------------------------constructors and destructor----------------------
75
76inline ParametricLine::ParametricLine( ParametricLine *par, QVector<QgsPoint *> *controlpoly )
77 : mParent( par )
78 , mControlPoly( controlpoly )
79{
80
81}
82
83#endif
84
85#endif
86
87
88
89
90
91
92
93
ParametricLine is an Interface for parametric lines.
virtual ~ParametricLine()=default
virtual void changeDirection()=0
ParametricLine()=default
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values.
Definition Vector3D.h:36
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_OUT
Definition qgis_sip.h:58