Simbody  3.8
Constraint_Weld.h
Go to the documentation of this file.
1 #ifndef SimTK_SIMBODY_CONSTRAINT_WELD_H_
2 #define SimTK_SIMBODY_CONSTRAINT_WELD_H_
3 
4 /* -------------------------------------------------------------------------- *
5  * Simbody(tm) *
6  * -------------------------------------------------------------------------- *
7  * This is part of the SimTK biosimulation toolkit originating from *
8  * Simbios, the NIH National Center for Physics-Based Simulation of *
9  * Biological Structures at Stanford, funded under the NIH Roadmap for *
10  * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
11  * *
12  * Portions copyright (c) 2007-14 Stanford University and the Authors. *
13  * Authors: Michael Sherman *
14  * Contributors: *
15  * *
16  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
17  * not use this file except in compliance with the License. You may obtain a *
18  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
19  * *
20  * Unless required by applicable law or agreed to in writing, software *
21  * distributed under the License is distributed on an "AS IS" BASIS, *
22  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
23  * See the License for the specific language governing permissions and *
24  * limitations under the License. *
25  * -------------------------------------------------------------------------- */
26 
31 
32 namespace SimTK {
33 
34 //==============================================================================
35 // WELD (COINCIDENT FRAMES) CONSTRAINT
36 //==============================================================================
37 
61 public:
62  // no default constructor
63 
67 
72 Weld(MobilizedBody& body1, const Transform& frame1,
73  MobilizedBody& body2, const Transform& frame2);
74 
76 Weld() {}
77 
78  // Control over generated decorative geometry.
79 
84 
89 
90  // Defaults for Instance variables.
91 
96 
99 
104 
107 
108 
109  // Stage::Topology
110 
113 
116 
117 
118  // Stage::Instance
119 const Transform& getFrameOnBody1(const State&) const;
120 const Transform& getFrameOnBody2(const State&) const;
121 
122  // Stage::Position, Velocity, Acceleration
125 
126  // Stage::Acceleration
128 Vec6 getMultipliers(const State&) const;
129 
130  // Forces are reported expressed in the body frame of the indicated body.
133  // hide from Doxygen
137 };
138 
139 
140 } // namespace SimTK
141 
142 #endif // SimTK_SIMBODY_CONSTRAINT_WELD_H_
143 
144 
145 
This defines the base Constraint class and related classes, which are used to specify limitations on ...
#define SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(DERIVED, DERIVED_IMPL, PARENT)
Definition: PrivateImplementation.h:343
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
Six constraint equations.
Definition: Constraint_Weld.h:60
const Transform & getFrameOnBody2(const State &) const
const SpatialVec & getWeldReactionOnBody1(const State &) const
Weld & setDefaultFrameOnBody2(const Transform &)
Explicitly set the default value for the frame on body2 which is to be made coincident with a frame o...
Weld()
Default constructor creates an empty handle.
Definition: Constraint_Weld.h:76
Vec6 getPositionErrors(const State &) const
Weld & setDefaultFrameOnBody1(const Transform &)
Explicitly set the default value for the frame on body1 which is to be made coincident with a frame o...
Vec6 getAccelerationErrors(const State &) const
MobilizedBodyIndex getBody1MobilizedBodyIndex() const
Report the MobilizedBodyIndex of body 1 for this Weld constraint.
Vec6 getVelocityErrors(const State &) const
const Transform & getFrameOnBody1(const State &) const
Weld(MobilizedBody &body1, const Transform &frame1, MobilizedBody &body2, const Transform &frame2)
Make a particular frame attached to one body coincident with a particular frame attached to the other...
const SpatialVec & getWeldReactionOnBody2(const State &) const
Weld & setAxisDisplayLength(Real r)
This is used only for visualization.
Weld(MobilizedBody &body1, MobilizedBody &body2)
Make the body frame of one body coincident with the body frame of the other body.
Vec6 getMultipliers(const State &) const
MobilizedBodyIndex getBody2MobilizedBodyIndex() const
Report the MobilizedBodyIndex of body 2 for this Weld constraint.
const Transform & getDefaultFrameOnBody1() const
Retrieve the default transform for the frame on body 1.
Real getAxisDisplayLength() const
Report the length being used for display of the frames being connected by this Weld.
const Transform & getDefaultFrameOnBody2() const
Retrieve the default transform for the frame on body 2.
This is the base class for all Constraint classes, which is just a handle for the underlying hidden i...
Definition: Constraint.h:67
This is for arrays indexed by mobilized body number within a subsystem (typically the SimbodyMatterSu...
A MobilizedBody is Simbody's fundamental body-and-joint object used to parameterize a system's motion...
Definition: MobilizedBody.h:169
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
This is a fixed-length column vector designed for no-overhead inline computation.
Definition: Vec.h:184
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:607