mbsimflexiblebody  3.0.0
contour2s_flexible.h
1 /* Copyright (C) 2004-2011 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: thorsten.schindler@mytum.de
18  */
19 
20 #ifndef _CONTOUR2SFLEXIBLE_H_
21 #define _CONTOUR2SFLEXIBLE_H_
22 
23 //#include "mbsim/contours/contour_2s.h"
24 
25 namespace MBSim {
26  class ContactKinematics;
27 }
28 
29 namespace MBSimFlexibleBody {
30 
36  class Contour2sFlexible : public MBSim::Contour2s {
37  public:
42  Contour2sFlexible(const std::string &name) : Contour2s(name) {}
43 
44  /* INHERITED INTERFACE OF ELEMENT */
45  virtual std::string getType() const { return "Contour2sFlexible"; }
46  /***************************************************/
47 
48  /* INHERITED INTERFACE OF CONTOUR */
49  virtual void updateKinematicsForFrame(MBSim::ContourPointData &cp, MBSim::FrameFeature ff) { static_cast<FlexibleBody*>(parent)->updateKinematicsForFrame(cp,ff); }
50  virtual void updateJacobiansForFrame(MBSim::ContourPointData &cp, int j = 0) { static_cast<FlexibleBody*>(parent)->updateJacobiansForFrame(cp); }
51  /***************************************************/
52 
53  MBSim::ContactKinematics * findContactPairingWith(std::string type0, std::string type1) {
54  return findContactPairingFlexible(type0.c_str(), type1.c_str());
55  }
56 
57  };
58 
59 }
60 
61 #endif /* _CONTOUR2SFLEXIBLE_H_ */
62