QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "Vector3D.h"
22 #include <QVector>
23 
24 class ANALYSIS_EXPORT ParametricLine
26 {
27  protected:
29  int mDegree;
33  QVector<Point3D*>* mControlPoly;
34  public:
38  ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly );
40  virtual ~ParametricLine();
41  virtual void add( ParametricLine* pl ) = 0;
42  virtual void calcFirstDer( float t, Vector3D* v ) = 0;
43  virtual void calcSecDer( float t, Vector3D* v ) = 0;
44  //virtual Point3D calcPoint(float t);
45  virtual void calcPoint( float t, Point3D* ) = 0;
46  virtual void changeDirection() = 0;
47  //virtual void draw(QPainter* p);
48  virtual const Point3D* getControlPoint( int number ) const = 0;
50  virtual const QVector<Point3D*>* getControlPoly() const = 0;
51  virtual int getDegree() const = 0;
52  virtual ParametricLine* getParent() const = 0;
53  //virtual bool intersects(ParametricLine* pal);
54  virtual void remove( int i ) = 0;
56  virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
57  virtual void setParent( ParametricLine* paral ) = 0;
58 };
59 
60 //-----------------------------------------constructors and destructor----------------------
61 
62 inline ParametricLine::ParametricLine() : mParent( 0 ), mControlPoly( 0 )
63 {
64 
65 }
66 
67 inline ParametricLine::ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly ) : mParent( par ), mControlPoly( controlpoly )
68 {
69 
70 }
71 
73 {
74  //delete mParent;
75 }
76 
77 #endif
78 
79 
80 
81 
82 
83 
84 
85