Simbody  3.5
Constraint_PointInPlane.h
Go to the documentation of this file.
1 #ifndef SimTK_SIMBODY_CONSTRAINT_POINT_IN_PLANE_H_
2 #define SimTK_SIMBODY_CONSTRAINT_POINT_IN_PLANE_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 // CONSTRAINT:: POINT IN PLANE
36 //==============================================================================
37 
48 public:
49 // no default constructor
50 PointInPlane(MobilizedBody& planeBody_B,
51  const UnitVec3& defaultPlaneNormal_B, Real defaultHeight,
52  MobilizedBody& followerBody_F, const Vec3& defaultFollowerPoint_F);
53 
56 
57 // These affect only generated decorative geometry for visualization;
58 // the plane is really infinite in extent with zero depth and the
59 // point is really of zero radius.
60 PointInPlane& setPlaneDisplayHalfWidth(Real);
61 PointInPlane& setPointDisplayRadius(Real);
62 Real getPlaneDisplayHalfWidth() const;
63 Real getPointDisplayRadius() const;
64 
65 // Defaults for Instance variables.
66 PointInPlane& setDefaultPlaneNormal(const UnitVec3&);
67 PointInPlane& setDefaultPlaneHeight(Real);
68 PointInPlane& setDefaultFollowerPoint(const Vec3&);
69 
70 // Stage::Topology
71 MobilizedBodyIndex getPlaneMobilizedBodyIndex() const;
72 MobilizedBodyIndex getFollowerMobilizedBodyIndex() const;
73 
74 const UnitVec3& getDefaultPlaneNormal() const;
75 Real getDefaultPlaneHeight() const;
76 const Vec3& getDefaultFollowerPoint() const;
77 
78 // Stage::Instance
79 const UnitVec3& getPlaneNormal(const State&) const;
80 Real getPlaneHeight(const State&) const;
81 const Vec3& getFollowerPoint(const State&) const;
82 
83 // Stage::Position, Velocity
84 Real getPositionError(const State&) const;
85 Real getVelocityError(const State&) const;
86 
87 // Stage::Acceleration
88 Real getAccelerationError(const State&) const;
89 Real getMultiplier(const State&) const;
90 Real getForceOnFollowerPoint(const State&) const; // in normal direction
91  // hide from Doxygen
94  (PointInPlane, PointInPlaneImpl, Constraint);
96 };
97 
98 
99 } // namespace SimTK
100 
101 #endif // SimTK_SIMBODY_CONSTRAINT_POINT_IN_PLANE_H_
102 
103 
104 
This is for arrays indexed by mobilized body number within a subsystem (typically the SimbodyMatterSu...
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:593
PointInPlane()
Default constructor creates an empty handle.
Definition: Constraint_PointInPlane.h:55
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:276
#define SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(DERIVED, DERIVED_IMPL, PARENT)
Definition: PrivateImplementation.h:343
One constraint equation.
Definition: Constraint_PointInPlane.h:47
This defines the base Constraint class and related classes, which are used to specify limitations on ...
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:72
A MobilizedBody is Simbody's fundamental body-and-joint object used to parameterize a system's motion...
Definition: MobilizedBody.h:167
This is the base class for all Constraint classes, which is just a handle for the underlying hidden i...
Definition: Constraint.h:66