Simbody
Public Member Functions

SimTK::Constraint::PrescribedMotion Class Reference

This is a subclass of Constraint::Custom which uses a Function to prescribe the behavior of a single generalized coordinate as a function of time. More...

#include <Constraint.h>

Inheritance diagram for SimTK::Constraint::PrescribedMotion:

List of all members.

Public Member Functions

 PrescribedMotion (SimbodyMatterSubsystem &matter, const Function *function, MobilizedBodyIndex coordBody, MobilizerQIndex coordIndex)
 Create a PrescribedMotion constraint.

Detailed Description

This is a subclass of Constraint::Custom which uses a Function to prescribe the behavior of a single generalized coordinate as a function of time.

You provide a Function which takes the current time as its argument and returns the required value of the generalized coordinate. It also must support derivatives up to second order.


Constructor & Destructor Documentation

Create a PrescribedMotion constraint.

You specify a Function that takes time as its single argument, and returns the required value for the constrained coordinate.

Parameters:
matterthe matter subsystem this constraint will be added to
functionthe Function which specifies the value of the constrained coordinate. The constraint takes over ownership of this object, and automatically deletes it when the constraint is deleted.
coordBodythe MobilizedBody corresponding to the generalized coordinate which will be constrained
coordIndexthe index of the generalized coordinate which will be constrained

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines