|
mbsimflexiblebody
4.0.0
|
00001 /* Copyright (C) 2004-2011 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: thorsten.schindler@mytum.de 00018 */ 00019 00020 #ifndef _CONTOUR1S_FLEXIBLE_H_ 00021 #define _CONTOUR1S_FLEXIBLE_H_ 00022 00023 #include "mbsim/contours/contour1s.h" 00024 #include "mbsimFlexibleBody/utils/contact_utils.h" 00025 #include "mbsimFlexibleBody/flexible_body.h" 00026 00027 namespace MBSim { 00028 class ContactKinematics; 00029 } 00030 00031 namespace MBSimFlexibleBody { 00032 00041 class Contour1sFlexible : public MBSim::Contour1s { 00042 public: 00047 Contour1sFlexible(const std::string &name) : Contour1s(name) {} 00048 00049 /* INHERITED INTERFACE OF ELEMENT */ 00050 virtual std::string getType() const { return "Contour1sFlexible"; } 00051 /***************************************************/ 00052 00053 /* INHERITED INTERFACE OF CONTOUR */ 00054 virtual void updateKinematicsForFrame(MBSim::ContourPointData &cp, MBSim::Frame::Frame::Feature ff) { static_cast<FlexibleBody*>(parent)->updateKinematicsForFrame(cp,ff); } 00055 virtual void updateJacobiansForFrame(MBSim::ContourPointData &cp, int j=0) { static_cast<FlexibleBody*>(parent)->updateJacobiansForFrame(cp); } 00056 /***************************************************/ 00057 00058 /* INHERITED INTERFACE OF CONTOURCONTINUUM */ 00059 virtual void computeRootFunctionPosition(MBSim::ContourPointData &cp) { updateKinematicsForFrame(cp, MBSim::Frame::position); } 00060 virtual void computeRootFunctionFirstTangent(MBSim::ContourPointData &cp) { updateKinematicsForFrame(cp, MBSim::Frame::firstTangent); } 00061 virtual void computeRootFunctionNormal(MBSim::ContourPointData &cp) { updateKinematicsForFrame(cp, MBSim::Frame::normal); } 00062 virtual void computeRootFunctionSecondTangent(MBSim::ContourPointData &cp) { updateKinematicsForFrame(cp, MBSim::Frame::secondTangent); } 00063 /***************************************************/ 00064 00065 MBSim::ContactKinematics * findContactPairingWith(std::string type0, std::string type1) { 00066 return findContactPairingFlexible(type0.c_str(), type1.c_str()); 00067 } 00068 00069 }; 00070 00071 } 00072 00073 #endif /* _CONTOUR1S_FLEXIBLE_H_ */ 00074
1.8.0