Simbody  3.5
Constraint_PointOnPlaneContact.h
Go to the documentation of this file.
00001 #ifndef SimTK_SIMBODY_CONSTRAINT_POINT_ON_PLANE_CONTACT_H_
00002 #define SimTK_SIMBODY_CONSTRAINT_POINT_ON_PLANE_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) 2014 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 
00030 #include "simbody/internal/Constraint.h"
00031 
00032 namespace SimTK {
00033 
00034 //==============================================================================
00035 //                         POINT ON PLANE CONTACT
00036 //==============================================================================
00037 
00087 class SimTK_SIMBODY_EXPORT Constraint::PointOnPlaneContact 
00088 :   public Constraint  {
00089 public:
00090     // no default constructor
00091 
00092 //------------------------------------------------------------------------------
00108 PointOnPlaneContact(MobilizedBody&     planeBody, 
00109                     const Transform&   defaultPlaneFrame, 
00110                     MobilizedBody&     followerBody, 
00111                     const Vec3&        defaultFollowerPoint);
00112     
00115 PointOnPlaneContact() {}
00116 
00120 PointOnPlaneContact& 
00121 setDefaultPlaneFrame(const Transform& defaultPlaneFrame);
00125 PointOnPlaneContact& 
00126 setDefaultFollowerPoint(const Vec3& defaultFollowerPoint);
00127 
00129 MobilizedBodyIndex getPlaneMobilizedBodyIndex() const;
00131 MobilizedBodyIndex getFollowerMobilizedBodyIndex() const;
00132 
00135 const Transform& getDefaultPlaneFrame() const;
00138 const Vec3&      getDefaultFollowerPoint() const;
00142 //------------------------------------------------------------------------------
00150 
00155 PointOnPlaneContact& setPlaneDisplayHalfWidth(Real halfWidth);
00160 PointOnPlaneContact& setPointDisplayRadius(Real radius);
00164 Real getPlaneDisplayHalfWidth() const;
00168 Real getPointDisplayRadius() const;
00172 //------------------------------------------------------------------------------
00187 
00193 const Transform& getPlaneFrame(const State& state) const;
00194 const Vec3&      getFollowerPoint(const State& state) const;
00198 //------------------------------------------------------------------------------
00207 Real getPositionError(const State& state) const;
00208 
00218 Vec3 getVelocityErrors(const State& state) const;
00219 
00223 Vec3 getAccelerationErrors(const State& state) const;
00224 
00231 Vec3 getMultipliers(const State& state) const;
00232 
00237 Vec3 getForceOnFollowerPoint(const State& state) const; // hide from Doxygen
00241 SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS
00242     (PointOnPlaneContact, PointOnPlaneContactImpl, Constraint);
00244 };
00245 
00246 } // namespace SimTK
00247 
00248 #endif // SimTK_SIMBODY_CONSTRAINT_POINT_ON_PLANE_CONTACT_H_
00249 
00250 
00251 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines