Go to the documentation of this file. 1 #ifndef SimTK_SIMBODY_FORCE_GRAVITY_H_
2 #define SimTK_SIMBODY_FORCE_GRAVITY_H_
129 Real zeroHeight = 0);
160 const Vec3& gravity);
221 Gravity& setDefaultGravityVector(
const Vec3& gravity);
237 {
return setDefaultDownDirection(
UnitVec3(down)); }
273 Vec3 getDefaultGravityVector()
const;
276 const UnitVec3& getDefaultDownDirection()
const;
278 Real getDefaultMagnitude()
const;
281 Real getDefaultZeroHeight()
const;
324 bool isExcluded)
const;
362 const Vec3& down)
const
363 {
return setDownDirection(state,
UnitVec3(down)); }
415 Vec3 getGravityVector(
const State& state)
const;
431 Real getMagnitude(
const State& state)
const;
440 Real getZeroHeight(
const State& state)
const;
466 Real getPotentialEnergy(
const State& state)
const;
507 {
return getBodyForces(state)[mobod]; }
533 long long getNumEvaluations()
const;
538 bool isForceCacheValid(
const State& state)
const;
543 void invalidateForceCache(
const State& state)
const;
554 #endif // SimTK_SIMBODY_FORCE_GRAVITY_H_
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
const SpatialVec & getBodyForce(const State &state, MobilizedBodyIndex mobod) const
Convenience method to extract the gravitational force on just one body; see getBodyForces() to get th...
Definition: Force_Gravity.h:506
#define SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS(DERIVED, DERIVED_IMPL, PARENT)
Definition: PrivateImplementation.h:343
This is a System that represents the dynamics of a particle moving along a smooth surface.
Definition: Assembler.h:37
This subsystem contains the bodies ("matter") in the multibody system, the mobilizers (joints) that d...
Definition: SimbodyMatterSubsystem.h:133
This is the base class from which all Force element handle classes derive.
Definition: Force.h:50
Gravity & setDefaultDownDirection(const Vec3 &down)
Convenience overload that takes the down direction as a Vec3 and normalizes it (throwing away the mag...
Definition: Force_Gravity.h:236
This is a concrete subsystem which can apply arbitrary forces to a MultibodySystem.
Definition: GeneralForceSubsystem.h:47
UnitVec< Real, 1 > UnitVec3
Definition: UnitVec.h:41
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
This force element represents a uniform gravitational field applied to a set of bodies.
Definition: Force_Gravity.h:70
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:606
Gravity()
Default constructor creates an empty handle.
Definition: Force_Gravity.h:191
This is the vector class intended to appear in user code for large, variable size column vectors.
Definition: BigMatrix.h:171
const Gravity & setDownDirection(State &state, const Vec3 &down) const
Convenience overload that takes the down direction as a Vec3 and normalizes it (throwing away the mag...
Definition: Force_Gravity.h:361