All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
contact_utils.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_UTILS_H_
21 #define _CONTACT_UTILS_H_
22 
23 //#include "mbsim/contours/contour_interpolation.h"
24 //#include "mbsim/dynamic_system_solver.h"
25 #include "fmatvec/fmatvec.h"
26 
27 //#include <vector>
28 
29 namespace MBSim {
30 
31  class ContactKinematics;
32 
38  double computeAngleOnUnitCircle(const fmatvec::Vec3& r);
39 
45  fmatvec::Vec2 computeAnglesOnUnitSphere(const fmatvec::Vec3& r);
46 
53  ContactKinematics* findContactPairingRigidRigid(const char* contour0, const char* contour1);
54 
55 // /*!
56 // * \brief apply contact between ContourInterpolation surfaces, using node-to-surface pairings, with both as master
57 // * \author Roland Zander
58 // * \date 2009-07-14 some comments (Thorsten Schindler)
59 // */
60 // template <class T>
61 // void ContactContourInterpolation(DynamicSystemSolver *ds, T *contact, ContourInterpolation *contour0, ContourInterpolation *contour1) {
62 // ContactContourInterpolation(ds,contact,contour0,contour1,0);
63 // }
64 //
65 // /*!
66 // * \brief apply contact between ContourInterploation surfaces, using node-to-surface pairings, defining master contour 1 or 2, default 0 for both
67 // * \author Roland Zander
68 // * \date 2009-07-14 some comments (Thorsten Schindler)
69 // */
70 // template <class T>
71 // void ContactContourInterpolation(DynamicSystemSolver *ds, const T *contact, ContourInterpolation *contour0, ContourInterpolation *contour1, int master) {
72 // ContourInterpolation *contour[2];
73 // contour[0] = contour0;
74 // contour[1] = contour1;
75 // std::string contactName = contact->getName();
76 //
77 // int cStart, cEnd;
78 // switch(master) {
79 // case 0: cStart = 0; cEnd = 1; break;
80 // case 1: cStart = 1; cEnd = 1; break;
81 // case 2: cStart = 0; cEnd = 0; break;
82 // }
83 //
84 // for(int c = cStart;c<cEnd+1;c++) { // loop with respect to contours
85 // int numberOfPoints = contour[c]->getNPoints();
86 // char contourName;
87 // switch(c) {
88 // case 0: contourName = 'A';break;
89 // case 1: contourName = 'B';break;
90 // }
91 // for(int i = 0;i<numberOfPoints; i++) { // use all points
92 // std::stringstream number;
93 // std::string name = contactName + number.str();
94 //
95 // T *newContact = new T( contact , name );
96 //
97 // newContact->connect(contour[c]->getPoint(i),contour[1-c]);
98 // ds->addLink(newContact);
99 // }
100 // }
101 // }
102 
103 }
104 
105 #endif /* _CONTACT_UTILS_H_ */
fmatvec::Vec2 computeAnglesOnUnitSphere(const fmatvec::Vec3 &r)
computes azimuthal and polar angles
Definition: contact_utils.cc:62
ContactKinematics * findContactPairingRigidRigid(const char *contour0, const char *contour1)
defines contact kinematics between two contours
Definition: contact_utils.cc:70
double computeAngleOnUnitCircle(const fmatvec::Vec3 &r)
computes azimuthal angle
Definition: contact_utils.cc:58

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML