Moby
StokesDragForce.h
1 /****************************************************************************
2  * Copyright 2009 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 _STOKES_DRAG_FORCE_H
8 #define _STOKES_DRAG_FORCE_H
9 
10 #include <Moby/RecurrentForce.h>
11 
12 namespace Moby {
14 {
15  public:
17  StokesDragForce(const StokesDragForce& source);
18  virtual ~StokesDragForce() {}
19  virtual void add_force(boost::shared_ptr<Ravelin::DynamicBodyd> body);
20  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
21  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
22 
24  double b, b_ang;
25 }; // end class
26 } // end namespace
27 
28 #endif
29 
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: StokesDragForce.cpp:68
Used for applying forces to the simulation on every time step.
Definition: RecurrentForce.h:24
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: StokesDragForce.cpp:88
Definition: StokesDragForce.h:13
StokesDragForce()
Constructs a default drag coefficient of 0.
Definition: StokesDragForce.cpp:20
virtual void add_force(boost::shared_ptr< Ravelin::DynamicBodyd > body)
Adds gravity to a body.
Definition: StokesDragForce.cpp:33
double b
The drag coefficient.
Definition: StokesDragForce.h:24