GeneralContactSubsystem.h
Go to the documentation of this file.00001 #ifndef SimTK_SIMBODY_GENERAL_CONTACT_SUBSYSTEM_H_
00002 #define SimTK_SIMBODY_GENERAL_CONTACT_SUBSYSTEM_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "SimTKcommon.h"
00036
00037 #include "simbody/internal/common.h"
00038 #include "simbody/internal/Contact.h"
00039
00040 namespace SimTK {
00041
00042 class MultibodySystem;
00043 class MobilizedBody;
00044 class ContactGeometry;
00045
00067 class SimTK_SIMBODY_EXPORT GeneralContactSubsystem : public Subsystem {
00068 public:
00069 GeneralContactSubsystem();
00070 explicit GeneralContactSubsystem(MultibodySystem&);
00075 ContactSetIndex createContactSet();
00079 int getNumContactSets() const;
00088 void addBody(ContactSetIndex index, const MobilizedBody& body, const ContactGeometry& geom, Transform transform);
00092 int getNumBodies(ContactSetIndex set) const;
00099 const MobilizedBody& getBody(ContactSetIndex set, ContactSurfaceIndex index) const;
00106 const ContactGeometry& getBodyGeometry(ContactSetIndex set, ContactSurfaceIndex index) const;
00113 ContactGeometry& updBodyGeometry(ContactSetIndex set, ContactSurfaceIndex index);
00120 const Transform& getBodyTransform(ContactSetIndex set, ContactSurfaceIndex index) const;
00127 Transform& updBodyTransform(ContactSetIndex set, ContactSurfaceIndex index);
00134 const Array_<Contact>& getContacts(const State& state, ContactSetIndex set) const;
00135 SimTK_PIMPL_DOWNCAST(GeneralContactSubsystem, Subsystem);
00136 private:
00137 class GeneralContactSubsystemImpl& updImpl();
00138 const GeneralContactSubsystemImpl& getImpl() const;
00139 };
00140
00141 }
00142
00143 #endif // SimTK_SIMBODY_GENERAL_CONTACT_SUBSYSTEM_H_