MBSim |
Project Page |
00001 /* Copyright (C) 2004-2009 MBSim Development Team 00002 * 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 of the License, or (at your option) any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 * Contact: martin.o.foerg@googlemail.com 00018 */ 00019 00020 #ifndef _CONTOUR_INTERPOLATION_H_ 00021 #define _CONTOUR_INTERPOLATION_H_ 00022 00023 #include "mbsim/contour.h" 00024 #include "mbsim/contours/point.h" 00025 00026 namespace MBSim { 00027 00034 class ContourInterpolation : public Contour { 00035 public: 00042 ContourInterpolation(const std::string &name, int parameters_, int nPoints_); 00048 void setPoint(Point *pointN, int n); 00052 std::vector<Point*> getPoints() const {return iPoints;} 00053 Point* getPoint(const int n) const {return iPoints[n];} 00057 int getNPoints() const {return numberOfPoints;} 00061 int getNContourParameters() const {return contourParameters;} 00067 virtual bool testInsideBounds(const ContourPointData &cp) = 0; 00074 virtual double computePointWeight(const fmatvec::VecV &s, int i) = 0; 00082 virtual double computePointWeight(const fmatvec::VecV &s, int i, int diff) = 0; 00086 fmatvec::VecV computePointWeights(const fmatvec::VecV &s); 00087 00088 fmatvec::Vec3 computeWrOC(const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWrOC(cp);}; 00089 fmatvec::Vec3 computeWvC (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWvC (cp);}; 00090 fmatvec::Mat3xV computeWt (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWt (cp);}; 00091 fmatvec::Vec3 computeWn (const fmatvec::Vec2& s);// {ContourPointData cp; cp.type=EXTINTERPOL;cp.alpha=s; return computeWn (cp);}; 00092 00093 fmatvec::Vec3 computeWrOC(const ContourPointData &cp); 00094 fmatvec::Vec3 computeWvC (const ContourPointData &cp); 00095 00096 fmatvec::Mat3xV computeWt (const ContourPointData &cp); 00097 virtual fmatvec::Vec3 computeWn (const ContourPointData &cp) = 0; 00098 00099 protected: 00103 std::vector<Point*> iPoints; 00107 int contourParameters; 00111 int numberOfPoints; 00112 }; 00113 } 00114 00115 #endif /* _CONTOUR_INTERPOLATION_H_ */
1.8.0