OpenSim::SimmMotionData Class Reference

A class implementing a SIMM motion file. More...

#include <SimmMotionData.h>

Inheritance diagram for OpenSim::SimmMotionData:
OpenSim::Object

List of all members.

Public Member Functions

 SimmMotionData ()
 Default constructor.
 SimmMotionData (const std::string &aFileName)
 SimmMotionData (Storage &aData)
 Constructor from a Storage object.
 SimmMotionData (const SimmMotionData &aData)
 Copy constructor.
virtual ~SimmMotionData ()
 Destructor.
virtual Objectcopy () const
 Copy this SimmMotionData and return a pointer to the copy.
SimmMotionDataoperator= (const SimmMotionData &aData)
 Assignment operator.
void copyData (const SimmMotionData &aData)
 Copy data members from one SimmMotionEvent to another.
int getNumColumns () const
int getColumnIndex (const std::string &aName) const
void setColumnLabel (int aIndex, const std::string &aLabel)
 Set the label of a column, specified by index.
double getValue (const std::string &aName, int aFrameIndex)
double getValue (const int columnIndex, int aFrameIndex)
 Get the value of one element in one frame.
double getRangeMin () const
double getRangeMax () const
int getNumberOfFrames () const
void addToRdStorage (Storage &rStorage, double aStartTime, double aEndTime)
 Add the coordinate data to an Storage object.
bool deleteColumn (const std::string &aColumnName)
void scaleColumn (int aColumnIndex, double aScaleFactor)
int getFrameNumberForTime (double time) const
 find frame number closest to passed in time.
void writeSIMMMotionFile (const std::string &aFileName, const std::string &aName, const std::string &aComment) const
const Array< std::string > & getColumnNames () const
const char * getUnassignedColName () const

Detailed Description

A class implementing a SIMM motion file.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

SimmMotionData::SimmMotionData (  ) 

Default constructor.

OpenSim::SimmMotionData::SimmMotionData ( const std::string &  aFileName  ) 
SimmMotionData::SimmMotionData ( Storage aData  ) 

Constructor from a Storage object.

SimmMotionData::SimmMotionData ( const SimmMotionData aData  ) 

Copy constructor.

Parameters:
aData SimmMotionData to be copied.
SimmMotionData::~SimmMotionData (  )  [virtual]

Destructor.


Member Function Documentation

void SimmMotionData::addToRdStorage ( Storage rStorage,
double  aStartTime,
double  aEndTime 
)

Add the coordinate data to an Storage object.

Assumptions: 1. the first column in the SimmMotionData is 'time' 2. the Storage object already contains data, so only the SimmMotionData frames whose time stamps match existing frames are added to it. 3. the Storage object does not already contain any columns with the same labels as the SimmMotionData has. If it does, the Storage will end up with duplicate column labels.

Parameters:
rStorage the storage to add the data to
aStartTime the time of the first frame to add
aEndTime the time of the last frame to add
Object * SimmMotionData::copy (  )  const [virtual]

Copy this SimmMotionData and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this SimmMotionData.

Reimplemented from OpenSim::Object.

void SimmMotionData::copyData ( const SimmMotionData aData  ) 

Copy data members from one SimmMotionEvent to another.

Parameters:
aData SimmMotionEvent to be copied.
bool OpenSim::SimmMotionData::deleteColumn ( const std::string &  aColumnName  ) 
int OpenSim::SimmMotionData::getColumnIndex ( const std::string &  aName  )  const
const Array<std::string>& OpenSim::SimmMotionData::getColumnNames (  )  const [inline]
int SimmMotionData::getFrameNumberForTime ( double  time  )  const

find frame number closest to passed in time.

int OpenSim::SimmMotionData::getNumberOfFrames (  )  const [inline]
int OpenSim::SimmMotionData::getNumColumns (  )  const [inline]
double OpenSim::SimmMotionData::getRangeMax (  )  const [inline]
double OpenSim::SimmMotionData::getRangeMin (  )  const [inline]
const char* OpenSim::SimmMotionData::getUnassignedColName (  )  const [inline]
double SimmMotionData::getValue ( const int  aColumnIndex,
int  aFrameIndex 
)

Get the value of one element in one frame.

Parameters:
aColumnIndex the index of the column
aFrameIndex the index of the frame to get the element from
Returns:
The value of the element
double OpenSim::SimmMotionData::getValue ( const std::string &  aName,
int  aFrameIndex 
)
SimmMotionData & SimmMotionData::operator= ( const SimmMotionData aData  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

void SimmMotionData::scaleColumn ( int  aColumnIndex,
double  aScaleFactor 
)
void SimmMotionData::setColumnLabel ( int  aIndex,
const std::string &  aLabel 
)

Set the label of a column, specified by index.

Parameters:
aIndex the index of the column
aLabel the new name of the column
void OpenSim::SimmMotionData::writeSIMMMotionFile ( const std::string &  aFileName,
const std::string &  aName,
const std::string &  aComment 
) const

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

Generated on Sun Sep 25 00:19:51 2011 for OpenSim by  doxygen 1.6.1