All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
contact_kinematics.h
1 /* Copyright (C) 2004-2009 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: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef _CONTACT_KINEMATICS_H_
21 #define _CONTACT_KINEMATICS_H_
22 
23 #include "fmatvec/fmatvec.h"
24 #include "fmatvec/atom.h"
25 #include <vector>
26 
27 namespace MBSim {
28 
29  class ContourFrame;
30  class Contour;
31 
39  class ContactKinematics : virtual public fmatvec::Atom {
40  public:
45 
49  virtual ~ContactKinematics() {}
50 
51  /* INTERFACE FOR DERIVED CLASSES */
56  virtual void assignContours(const std::vector<Contour*> &contour) = 0;
57 
65  virtual void updateg(double &g, std::vector<ContourFrame*> &cFrame, int index = 0) = 0;
66 
74  virtual void updatewb(fmatvec::Vec &wb, double g, std::vector<ContourFrame*> &cFrame) = 0;
75 
81  void assignContours(Contour *contour1, Contour *contour2) { std::vector<Contour*> c; c.push_back(contour1);c.push_back(contour2); assignContours(c); }
82 
87 
88  virtual ContactKinematics* getContactKinematics(int i=0) const { return 0; }
89 
90  virtual void setSearchAllContactPoints(bool searchAllCP_=true) { }
91  virtual void setInitialGuess(const fmatvec::VecV &zeta0_) { }
92 
93  protected:
98  };
99 
100 }
101 
102 #endif /* _CONTACT_KINEMATICS_H_ */
ContactKinematics()
constructor
Definition: contact_kinematics.h:44
virtual void updatewb(fmatvec::Vec &wb, double g, std::vector< ContourFrame * > &cFrame)=0
compute acceleration in terms of contour parameters for event driven integration
basic class for contour definition for rigid (which do not know about their shape) and flexible (they...
Definition: contour.h:40
casadi::DM c(const double &x)
convert double to casadi::DM
Definition: symbolic_function.h:48
int numberOfPotentialContactPoints
number of potential contact points
Definition: contact_kinematics.h:97
virtual void assignContours(const std::vector< Contour * > &contour)=0
treats ordering of contours
int getNumberOfPotentialContactPoints() const
Definition: contact_kinematics.h:86
virtual ~ContactKinematics()
destructor
Definition: contact_kinematics.h:49
void assignContours(Contour *contour1, Contour *contour2)
treats ordering of contours
Definition: contact_kinematics.h:81
basic class for contact kinematical calculations
Definition: contact_kinematics.h:39
virtual void updateg(double &g, std::vector< ContourFrame * > &cFrame, int index=0)=0
compute normal distance, possible contact point positions and orientation (cf. contact.cc)

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML