GeneralForceSubsystem Class Reference

#include <GeneralForceSubsystem.h>

Inheritance diagram for GeneralForceSubsystem:

ForceSubsystem Subsystem

List of all members.


Detailed Description

This is a concrete subsystem which can apply arbitrary forces to a MultibodySystem.

Each force is represented by a Force object. For example, to add a spring between two bodies, you would write

 GeneralForceSubsystem forces(system);
 ...
 Force::TwoPointLinearSpring(forces, body1, station1, body2, station2, k, x0);
 

Public Member Functions

 GeneralForceSubsystem ()
 GeneralForceSubsystem (MultibodySystem &)
ForceIndex adoptForce (Force &force)
 Attach a new force to this subsystem.
int getNForces () const
 Get the number of Forces which have been added.
const ForcegetForce (ForceIndex index) const
 Get a const reference to a Force by index.
ForceupdForce (ForceIndex index)
 Get a modifiable reference to a Force by index.

Public Attributes

 GeneralForceSubsystem
 ForceSubsystem

Constructor & Destructor Documentation

GeneralForceSubsystem ( MultibodySystem  )  [explicit]


Member Function Documentation

ForceIndex adoptForce ( Force force  ) 

Attach a new force to this subsystem.

The subsystem takes over ownership of the force, leaving the passed in handle as a reference to it.

int getNForces (  )  const

Get the number of Forces which have been added.

const Force& getForce ( ForceIndex  index  )  const

Get a const reference to a Force by index.

Force& updForce ( ForceIndex  index  ) 

Get a modifiable reference to a Force by index.


Member Data Documentation

Reimplemented from ForceSubsystem.


The documentation for this class was generated from the following file:

Generated on Fri Sep 26 07:44:32 2008 for SimTKcore by  doxygen 1.5.6