7 #ifndef _TS_SIMULATOR_H
8 #define _TS_SIMULATOR_H
11 #include <Ravelin/sorted_pair>
12 #include <Moby/ConstraintSimulator.h>
13 #include <Moby/ImpactConstraintHandler.h>
14 #include <Moby/PenaltyConstraintHandler.h>
15 #include <Moby/SustainedUnilateralConstraintHandler.h>
16 #include <Moby/PairwiseDistInfo.h>
18 #include <Moby/UnilateralConstraint.h>
22 class ContactParameters;
23 class CollisionDetection;
24 class CollisionGeometry;
34 virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
35 virtual void save_to_xml(
XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects)
const;
36 virtual double step(
double dt);
46 std::vector<std::pair<ControlledBodyPtr, Ravelin::VectorNd> >
_x0, _x1;
52 bool constraints_met(
const std::vector<PairwiseDistInfo>& current_pairwise_distances);
Defines an abstract collision detection mechanism.
Definition: CollisionDetection.h:38
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: TimeSteppingSimulator.cpp:480
double calc_next_CA_Euler_step() const
Finds the next event time assuming constant velocity.
Definition: TimeSteppingSimulator.cpp:276
double do_mini_step(double dt)
Does a full integration cycle (but not necessarily a full step)
Definition: TimeSteppingSimulator.cpp:114
bool constraints_met(const std::vector< PairwiseDistInfo > ¤t_pairwise_distances)
Checks to see whether all constraints are met.
Definition: TimeSteppingSimulator.cpp:229
An virtual class for simulation with constraints.
Definition: ConstraintSimulator.h:29
std::vector< std::pair< ControlledBodyPtr, Ravelin::VectorNd > > _x0
Vectors set and passed to collision detection.
Definition: TimeSteppingSimulator.h:46
virtual double step(double dt)
Steps the simulator forward by the given step size.
Definition: TimeSteppingSimulator.cpp:52
An event-driven simulator.
Definition: TimeSteppingSimulator.h:27
boost::shared_ptr< CollisionGeometry > CollisionGeometryPtr
Collision geometry smart pointer.
Definition: Types.h:77
std::set< Ravelin::sorted_pair< CollisionGeometryPtr > > unchecked_pairs
Determines whether two geometries are not checked.
Definition: TimeSteppingSimulator.h:43
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
std::set< Ravelin::sorted_pair< CollisionGeometryPtr > > get_current_contact_geoms() const
Gets the current set of contact geometries.
Definition: TimeSteppingSimulator.cpp:255
void step_si_Euler(double dt)
Does a semi-implicit step.
Definition: TimeSteppingSimulator.cpp:437
boost::shared_ptr< TimeSteppingSimulator > get_this()
Gets the shared pointer for this.
Definition: TimeSteppingSimulator.h:49
TimeSteppingSimulator()
Default constructor.
Definition: TimeSteppingSimulator.cpp:46
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: TimeSteppingSimulator.cpp:462