7 #ifndef _GRAVITY_FORCE_H
8 #define _GRAVITY_FORCE_H
10 #include <Ravelin/Vector3d.h>
11 #include <Moby/RecurrentForce.h>
22 virtual void add_force(boost::shared_ptr<Ravelin::DynamicBodyd> body);
23 virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
24 virtual void save_to_xml(
XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects)
const;
Used for applying forces to the simulation on every time step.
Definition: RecurrentForce.h:24
GravityForce()
Constructs a default gravity vector of [0,0,0].
Definition: GravityForce.cpp:21
Ravelin::Vector3d gravity
The gravity vector.
Definition: GravityForce.h:27
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
Gravitational force applied to bodies.
Definition: GravityForce.h:16
virtual void add_force(boost::shared_ptr< Ravelin::DynamicBodyd > body)
Adds gravity to a body.
Definition: GravityForce.cpp:33
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: GravityForce.cpp:72
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: GravityForce.cpp:87