Simbody
3.4 (development)
|
00001 #ifndef SimTK_SIMBODY_HUNT_CROSSLEY_CONTACT_H_ 00002 #define SimTK_SIMBODY_HUNT_CROSSLEY_CONTACT_H_ 00003 00004 /* -------------------------------------------------------------------------- * 00005 * Simbody(tm) * 00006 * -------------------------------------------------------------------------- * 00007 * This is part of the SimTK biosimulation toolkit originating from * 00008 * Simbios, the NIH National Center for Physics-Based Simulation of * 00009 * Biological Structures at Stanford, funded under the NIH Roadmap for * 00010 * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. * 00011 * * 00012 * Portions copyright (c) 2006-12 Stanford University and the Authors. * 00013 * Authors: Michael Sherman * 00014 * Contributors: * 00015 * * 00016 * Licensed under the Apache License, Version 2.0 (the "License"); you may * 00017 * not use this file except in compliance with the License. You may obtain a * 00018 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * 00019 * * 00020 * Unless required by applicable law or agreed to in writing, software * 00021 * distributed under the License is distributed on an "AS IS" BASIS, * 00022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 00023 * See the License for the specific language governing permissions and * 00024 * limitations under the License. * 00025 * -------------------------------------------------------------------------- */ 00026 00032 #include "SimTKcommon.h" 00033 00034 #include "simbody/internal/common.h" 00035 #include "simbody/internal/ForceSubsystem.h" 00036 00037 #include <cassert> 00038 00039 namespace SimTK { 00040 00041 class MultibodySystem; 00042 00089 class SimTK_SIMBODY_EXPORT HuntCrossleyContact : public ForceSubsystem { 00090 public: 00091 HuntCrossleyContact(); 00092 explicit HuntCrossleyContact(MultibodySystem&); 00093 00094 int addSphere(MobilizedBodyIndex body, const Vec3& center, 00095 const Real& radius, 00096 const Real& stiffness, // E (plane strain) 00097 const Real& dissipation); // c (1/v) 00098 00099 int addHalfSpace(MobilizedBodyIndex body, const UnitVec3& normal, 00100 const Real& height, 00101 const Real& stiffness, // E (plane strain) 00102 const Real& dissipation); // c (1/v) 00103 00104 SimTK_PIMPL_DOWNCAST(HuntCrossleyContact, ForceSubsystem); 00105 private: 00106 class HuntCrossleyContactRep& updRep(); 00107 const HuntCrossleyContactRep& getRep() const; 00108 }; 00109 00110 } // namespace SimTK 00111 00112 #endif // SimTK_SIMBODY_HUNT_CROSSLEY_CONTACT_H_