Moby
ContactParameters.h
1 /****************************************************************************
2  * Copyright 2011 Evan Drumwright
3  * This library is distributed under the terms of the Apache V2.0
4  * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
5  ****************************************************************************/
6 
7 #ifndef _MOBY_CONTACT_PARAMETERS_H_
8 #define _MOBY_CONTACT_PARAMETERS_H_
9 
10 #include <Moby/Base.h>
11 #include <Moby/Types.h>
12 #include <Ravelin/sorted_pair>
13 
14 namespace Moby {
15 
17 class ContactParameters : public Base
18 {
19  public:
22  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
23  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
24 
26  Ravelin::sorted_pair<BasePtr> objects;
27 
29  double epsilon;
30 
32  double mu_coulomb;
33 
35  double mu_viscous;
36 
38  double stiffness;
39 
41  double damping;
42 
44  double penalty_Kp;
45 
47  double penalty_Kv;
48 
50  unsigned NK;
51 }; // end class
52 
53 } // end namespace
54 
55 #endif // #ifdef MOBY_CONTACT_PARAMETERS_H_
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Definition: ContactParameters.cpp:150
unsigned NK
Number of edges in the polygon friction cone, minimum of 4 (default 4)
Definition: ContactParameters.h:50
double damping
contact damping
Definition: ContactParameters.h:41
Class from which all Moby classes are derived.
Definition: Base.h:20
double mu_viscous
Coefficient of viscous friction for contact (default is 0.0)
Definition: ContactParameters.h:35
double stiffness
contact stiffness (set to zero stiffness for true rigidity)
Definition: ContactParameters.h:38
boost::shared_ptr< Base > BasePtr
Base smart pointer.
Definition: Types.h:83
ContactParameters()
Constructs a ContactParameters object with no object pointers.
Definition: ContactParameters.cpp:21
Class for storing contact modeling parameters between two bodies.
Definition: ContactParameters.h:17
double penalty_Kp
Penalty Method Depth Penalty.
Definition: ContactParameters.h:44
Ravelin::sorted_pair< BasePtr > objects
The objects in contact.
Definition: ContactParameters.h:26
double penalty_Kv
Penalty Method Interpenetration Speed.
Definition: ContactParameters.h:47
double epsilon
Coefficient of restitution for contact (default is 0.0)
Definition: ContactParameters.h:29
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: ContactParameters.cpp:51
double mu_coulomb
Coefficient of Coulomb friction for contact (default is 0.0)
Definition: ContactParameters.h:32