Quantum GIS API Documentation  1.8
src/analysis/interpolation/CloughTocherInterpolator.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           CloughTocherInterpolator.h  -  description
00003                              -------------------
00004     copyright            : (C) 2004 by Marco Hugentobler
00005     email                : [email protected]
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 CLOUGHTOCHERINTERPOLATOR_H
00018 #define CLOUGHTOCHERINTERPOLATOR_H
00019 
00020 #include "NormVecDecorator.h"
00021 #include "TriangleInterpolator.h"
00022 #include "Point3D.h"
00023 #include "Vector3D.h"
00024 #include "MathUtils.h"
00025 #include "Bezier3D.h"
00026 
00028 class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
00029 {
00030   protected:
00032     NormVecDecorator* mTIN;
00034     double mEdgeTolerance;
00036     Point3D point1;
00038     Point3D point2;
00040     Point3D point3;
00041     Point3D cp1;
00042     Point3D cp2;
00043     Point3D cp3;
00044     Point3D cp4;
00045     Point3D cp5;
00046     Point3D cp6;
00047     Point3D cp7;
00048     Point3D cp8;
00049     Point3D cp9;
00050     Point3D cp10;
00051     Point3D cp11;
00052     Point3D cp12;
00053     Point3D cp13;
00054     Point3D cp14;
00055     Point3D cp15;
00056     Point3D cp16;
00058     double der1X;
00060     double der1Y;
00062     double der2X;
00064     double der2Y;
00066     double der3X;
00068     double der3Y;
00070     Point3D lpoint1;
00072     Point3D lpoint2;
00074     Point3D lpoint3;
00076     void init( double x, double y );
00078     double calcBernsteinPoly( int n, int i, int j, int k, double u, double v, double w );
00079 
00080   public:
00082     CloughTocherInterpolator();
00084     CloughTocherInterpolator( NormVecDecorator* tin );
00086     virtual ~CloughTocherInterpolator();
00088     virtual bool calcNormVec( double x, double y, Vector3D* result );
00090     virtual bool calcPoint( double x, double y, Point3D* result );
00091     virtual void setTriangulation( NormVecDecorator* tin );
00092 };
00093 
00094 
00095 inline CloughTocherInterpolator::CloughTocherInterpolator() : mTIN( 0 ), mEdgeTolerance( 0.00001 )
00096 {
00097 
00098 }
00099 
00100 inline CloughTocherInterpolator::CloughTocherInterpolator( NormVecDecorator* tin ) : mTIN( tin ), mEdgeTolerance( 0.00001 )
00101 {
00102 
00103 }
00104 
00105 inline CloughTocherInterpolator::~CloughTocherInterpolator()
00106 {
00107   //nothing to do
00108 }
00109 
00110 inline void CloughTocherInterpolator::setTriangulation( NormVecDecorator* tin )
00111 {
00112   mTIN = tin;
00113 }
00114 
00115 #endif
00116 
00117 
00118 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines