QGIS API Documentation  2.99.0-Master (c42dad3)
ParametricLine.h
Go to the documentation of this file.
1 /***************************************************************************
2  ParametricLine.h - description
3  -------------------
4  copyright : (C) 2004 by Marco Hugentobler
5  email : [email protected]
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 "Point3D.h"
21 #include <QVector>
22 
23 class Vector3D;
24 
28 class ANALYSIS_EXPORT ParametricLine
29 {
30  protected:
32  int mDegree;
36  QVector<Point3D*>* mControlPoly;
37  public:
40 
43  ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly );
45  virtual ~ParametricLine();
46  virtual void add( ParametricLine* pl ) = 0;
47  virtual void calcFirstDer( float t, Vector3D* v ) = 0;
48  virtual void calcSecDer( float t, Vector3D* v ) = 0;
49  //virtual Point3D calcPoint(float t);
50  virtual void calcPoint( float t, Point3D* ) = 0;
51  virtual void changeDirection() = 0;
52  //virtual void draw(QPainter* p);
53  virtual const Point3D* getControlPoint( int number ) const = 0;
54  virtual const QVector<Point3D*>* getControlPoly() const = 0;
55  virtual int getDegree() const = 0;
56  virtual ParametricLine* getParent() const = 0;
57  //virtual bool intersects(ParametricLine* pal);
58  virtual void remove( int i ) = 0;
59  virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
60  virtual void setParent( ParametricLine* paral ) = 0;
61 };
62 
63 //-----------------------------------------constructors and destructor----------------------
64 
66  : mDegree( 0 )
67  , mParent( nullptr )
68  , mControlPoly( nullptr )
69 {
70 
71 }
72 
73 inline ParametricLine::ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly )
74  : mDegree( 0 )
75  , mParent( par )
76  , mControlPoly( controlpoly )
77 {
78 
79 }
80 
82 {
83  //delete mParent;
84 }
85 
86 #endif
87 
88 
89 
90 
91 
92 
93 
94 
virtual ~ParametricLine()
Destructor.
Point3D is a class to represent a three dimensional point.
Definition: Point3D.h:24
Class Vector3D represents a 3D-Vector, capable to store x-,y- and z-coordinates in double values...
Definition: Vector3D.h:28
int mDegree
Degree of the parametric Line.
ParametricLine * mParent
Pointer to the parent object. If there isn&#39;t one, mParent is 0.
ParametricLine is an Interface for parametric lines.
QVector< Point3D * > * mControlPoly
MControlPoly stores the points of the control polygon.
ParametricLine()
Default constructor.