Moby
Dissipation.h
1 /****************************************************************************
2  * Copyright 2015 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 _DISSIPATION_H
8 #define _DISSIPATION_H
9 
10 #include <Moby/RecurrentForce.h>
11 
12 namespace Moby {
13 class Dissipation : public Base
14 {
15  public:
16  Dissipation();
17  virtual ~Dissipation() {}
18  void apply(const std::vector<boost::shared_ptr<Ravelin::DynamicBodyd> >& bodies);
19  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
20  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
21 
23  std::map<boost::shared_ptr<Ravelin::DynamicBodyd>, double> _coeffs;
24 }; // end class
25 } // end namespace
26 
27 #endif
28 
Class from which all Moby classes are derived.
Definition: Base.h:20
Definition: Dissipation.h:13
std::map< boost::shared_ptr< Ravelin::DynamicBodyd >, double > _coeffs
The mapping from bodies to decay coefficients.
Definition: Dissipation.h:23
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: Dissipation.cpp:107
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: Dissipation.cpp:58