OpenSim::DynamicsTool Class Reference

An abstract Tool for defining tools for perfroming a dynamics analysis with a given model. More...

#include <DynamicsTool.h>

Inheritance diagram for OpenSim::DynamicsTool:
OpenSim::Tool OpenSim::Object OpenSim::InverseDynamicsTool

List of all members.

Public Member Functions

virtual ~DynamicsTool ()
 Destructor.
 DynamicsTool ()
 Default constructor.
 DynamicsTool (const std::string &aFileName, bool aLoadModel=true) SWIG_DECLARE_EXCEPTION
 DynamicsTool (const DynamicsTool &aTool)
 Copy constructor.
virtual OpenSim::Objectcopy () const =0
 Construct and return a copy of this object.
void disableModelForces (Model &model, SimTK::State &s, const Array< std::string > &forcesByNameOrGroup)
 Modify model to exclude specified forces by disabling those identified by name or group.
const ExternalLoadsgetExternalLoads () const
ExternalLoadsupdExternalLoads ()
const std::string & getExternalLoadsFileName () const
void setExternalLoadsFileName (const std::string &aFileName)
DynamicsTooloperator= (const DynamicsTool &aDynamicsTool)
 Assignment operator.
void setStartTime (double d)
double getStartTime () const
void setEndTime (double d)
double getEndTime () const
void setModel (Model &aModel)
void setExcludedForces (const Array< std::string > &aExcluded)
bool createExternalLoads (const std::string &aExternalLoadsFileName, Model &aModel, const Storage *loadKinematics=NULL)
virtual bool run () SWIG_DECLARE_EXCEPTION=0
 The run() method of a Tool embodies what would be the main() routine for a standalone program.

Protected Attributes

Model_model
 Pointer to the model being investigated.
PropertyStr _modelFileNameProp
 Name of the xml file used to deserialize or construct a model.
std::string & _modelFileName
PropertyDblVec2 _timeRangeProp
 The range of time over which to perform the dynamics analysis.
SimTK::Vec2 & _timeRange
PropertyStrArray _excludedForcesProp
 Idenitify the list of forces to be ignored for computing dynamics.
Array< std::string > & _excludedForces
OpenSim::PropertyStr _externalLoadsFileNameProp
 Name of the file containing the external loads applied to the model.
std::string & _externalLoadsFileName
ExternalLoads _externalLoads
 External loads object that manages loading and applying external forces to the model, including transformations required by the Tool.

Detailed Description

An abstract Tool for defining tools for perfroming a dynamics analysis with a given model.

For example, InverseDynamics and ForwardDynamics Tools derive from DynamicsTool, which provides convenient method for performing and dynamics analysis over or to produce a trajectory in time.

Author:
Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

DynamicsTool::~DynamicsTool (  )  [virtual]

Destructor.

DynamicsTool::DynamicsTool (  ) 

Default constructor.

OpenSim::DynamicsTool::DynamicsTool ( const std::string &  aFileName,
bool  aLoadModel = true 
)
DynamicsTool::DynamicsTool ( const DynamicsTool aTool  ) 

Copy constructor.

Parameters:
aTool Object to be copied.

Member Function Documentation

virtual OpenSim::Object* OpenSim::DynamicsTool::copy (  )  const [pure virtual]

Construct and return a copy of this object.

The object is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this object.

Reimplemented from OpenSim::Object.

Implemented in OpenSim::InverseDynamicsTool.

bool OpenSim::DynamicsTool::createExternalLoads ( const std::string &  aExternalLoadsFileName,
Model aModel,
const Storage loadKinematics = NULL 
)
void DynamicsTool::disableModelForces ( Model model,
SimTK::State &  s,
const Array< std::string > &  forcesByNameOrGroup 
)

Modify model to exclude specified forces by disabling those identified by name or group.

double OpenSim::DynamicsTool::getEndTime (  )  const [inline]
const ExternalLoads& OpenSim::DynamicsTool::getExternalLoads (  )  const [inline]
const std::string& OpenSim::DynamicsTool::getExternalLoadsFileName (  )  const [inline]
double OpenSim::DynamicsTool::getStartTime (  )  const [inline]
DynamicsTool & DynamicsTool::operator= ( const DynamicsTool aTool  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Tool.

Reimplemented in OpenSim::InverseDynamicsTool.

virtual bool OpenSim::DynamicsTool::run (  )  [pure virtual]

The run() method of a Tool embodies what would be the main() routine for a standalone program.

Therefore, any OpenSim main program can become a Tool executable from the GUI by making it a run() method for a new Tool.

It is expected that the run() method be composed of a sequence of calls to underlying computational and reporting objects and should

Implements OpenSim::Tool.

Implemented in OpenSim::InverseDynamicsTool.

void OpenSim::DynamicsTool::setEndTime ( double  d  )  [inline]
void OpenSim::DynamicsTool::setExcludedForces ( const Array< std::string > &  aExcluded  )  [inline]
void OpenSim::DynamicsTool::setExternalLoadsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::DynamicsTool::setModel ( Model aModel  )  [inline]
void OpenSim::DynamicsTool::setStartTime ( double  d  )  [inline]
ExternalLoads& OpenSim::DynamicsTool::updExternalLoads (  )  [inline]

Member Data Documentation

Array<std::string>& OpenSim::DynamicsTool::_excludedForces [protected]

Idenitify the list of forces to be ignored for computing dynamics.

External loads object that manages loading and applying external forces to the model, including transformations required by the Tool.

Name of the file containing the external loads applied to the model.

Pointer to the model being investigated.

std::string& OpenSim::DynamicsTool::_modelFileName [protected]

Name of the xml file used to deserialize or construct a model.

SimTK::Vec2& OpenSim::DynamicsTool::_timeRange [protected]

The range of time over which to perform the dynamics analysis.


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

Generated on Sun Sep 25 00:20:06 2011 for OpenSim by  doxygen 1.6.1