Quantum GIS API Documentation  1.7.4
src/analysis/interpolation/ParametricLine.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           ParametricLine.h  -  description
00003                              -------------------
00004     copyright            : (C) 2004 by Marco Hugentobler
00005     email                : mhugent@geo.unizh.ch
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef PARAMETRICLINE_H
00018 #define PARAMETRICLINE_H
00019 
00020 #include "Point3D.h"
00021 #include "Vector3D.h"
00022 #include <QVector>
00023 
00024 class ANALYSIS_EXPORT ParametricLine
00026 {
00027   protected:
00029     int mDegree;
00031     ParametricLine* mParent;
00033     QVector<Point3D*>* mControlPoly;
00034   public:
00036     ParametricLine();
00038     ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly );
00040     virtual ~ParametricLine();
00041     virtual void add( ParametricLine* pl ) = 0;
00042     virtual void calcFirstDer( float t, Vector3D* v ) = 0;
00043     virtual void calcSecDer( float t, Vector3D* v ) = 0;
00044     //virtual Point3D calcPoint(float t);
00045     virtual void calcPoint( float t, Point3D* ) = 0;
00046     virtual void changeDirection() = 0;
00047     //virtual void draw(QPainter* p);
00048     virtual const Point3D* getControlPoint( int number ) const = 0;
00049     virtual const QVector<Point3D*>* getControlPoly() const = 0;
00050     virtual int getDegree() const = 0;
00051     virtual ParametricLine* getParent() const = 0;
00052     //virtual bool intersects(ParametricLine* pal);
00053     virtual void remove( int i ) = 0;
00054     virtual void setControlPoly( QVector<Point3D*>* cp ) = 0;
00055     virtual void setParent( ParametricLine* paral ) = 0;
00056 };
00057 
00058 //-----------------------------------------constructors and destructor----------------------
00059 
00060 inline ParametricLine::ParametricLine() : mParent( 0 ), mControlPoly( 0 )
00061 {
00062 
00063 }
00064 
00065 inline ParametricLine::ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly ) : mParent( par ), mControlPoly( controlpoly )
00066 {
00067 
00068 }
00069 
00070 inline ParametricLine::~ParametricLine()
00071 {
00072   //delete mParent;
00073 }
00074 
00075 #endif
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines