A class for recording the kinematics of a point on a body of a model during a simulation. More...
#include <PointKinematics.h>
Public Member Functions | |
PointKinematics (Model *aModel=0) | |
Construct an PointKinematics instance for recording the kinematics of the bodies of a model during a simulation. | |
PointKinematics (const std::string &aFileName) | |
Construct an object from file. | |
PointKinematics (const PointKinematics &aObject) | |
Copy constructor. | |
virtual Object * | copy () const |
Clone. | |
virtual | ~PointKinematics () |
Destructor. | |
PointKinematics & | operator= (const PointKinematics &aPointKinematics) |
Assign this object to the values of another. | |
void | setBodyPoint (const std::string &aBody, const SimTK::Vec3 &aPoint) |
Set the body for which the point kinematics are to be computed and the point on the body represented in local frame. | |
void | setBody (Body *aBody) |
Set the body for which the induced accelerations are to be computed. | |
void | setRelativeToBody (Body *aBody) |
Body * | getBody () |
Get the body for which the induced accelerations are to be computed. | |
Body * | getRelativeToBody () |
void | setPoint (const SimTK::Vec3 &aPoint) |
Set the point for which the induced accelerations are to be computed. | |
void | getPoint (SimTK::Vec3 &rPoint) |
Get the point for which the induced accelerations are to be computed. | |
void | setPointName (const char *aName) |
Set a name for the point. | |
const std::string & | getPointName () |
Get the point name. | |
virtual void | setModel (Model &aModel) |
Set the model for which the point kinematics are to be computed. | |
void | setStorageCapacityIncrements (int aIncrement) |
Set the capacity increments of all storage instances. | |
Storage * | getAccelerationStorage () |
Get the acceleration storage. | |
Storage * | getVelocityStorage () |
Get the velocity storage. | |
Storage * | getPositionStorage () |
Get the position storage. | |
virtual int | begin (const SimTK::State &s) |
This method is called at the beginning of an analysis so that any necessary initializations may be performed. | |
virtual int | step (const SimTK::State &s) |
This method is called to perform the analysis. | |
virtual int | end (const SimTK::State &s) |
This method is called at the end of an analysis so that any necessary finalizations may be performed. | |
virtual int | printResults (const std::string &aBaseName, const std::string &aDir="", double aDT=-1.0, const std::string &aExtension=".sto") |
Print the results of the analysis. | |
Static Public Attributes | |
static const int | NAME_LENGTH = PointKinematicsNAME_LENGTH |
static const int | BUFFER_LENGTH = PointKinematicsBUFFER_LENGTH |
Protected Member Functions | |
virtual int | record (const SimTK::State &s) |
Record the kinematics. | |
Protected Attributes | |
PropertyStr | _bodyNameProp |
PropertyDblVec3 | _pointProp |
PropertyStr | _pointNameProp |
PropertyStr | _relativeToBodyNameProp |
std::string & | _bodyName |
SimTK::Vec3 & | _point |
std::string & | _pointName |
std::string & | _relativeToBodyName |
double * | _dy |
double * | _kin |
Storage * | _pStore |
Storage * | _vStore |
Storage * | _aStore |
A class for recording the kinematics of a point on a body of a model during a simulation.
PointKinematics::PointKinematics | ( | Model * | aModel = 0 |
) |
Construct an PointKinematics instance for recording the kinematics of the bodies of a model during a simulation.
Also serves as a default constructor
aModel | Model for which the analyses are to be recorded. |
PointKinematics::PointKinematics | ( | const std::string & | aFileName | ) |
Construct an object from file.
The object is constructed from the root element of the XML document. The type of object is the tag name of the XML root element.
aFileName | File name of the document. |
PointKinematics::PointKinematics | ( | const PointKinematics & | aObject | ) |
Copy constructor.
PointKinematics::~PointKinematics | ( | ) | [virtual] |
Destructor.
int PointKinematics::begin | ( | const SimTK::State & | s | ) | [virtual] |
This method is called at the beginning of an analysis so that any necessary initializations may be performed.
This method is meant to be called at the begining of an integration
This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.
s | current system state | |
aClientData | General use pointer for sending in client data. |
Reimplemented from OpenSim::Analysis.
Object * PointKinematics::copy | ( | ) | const [virtual] |
Clone.
Reimplemented from OpenSim::Analysis.
int PointKinematics::end | ( | const SimTK::State & | s | ) | [virtual] |
This method is called at the end of an analysis so that any necessary finalizations may be performed.
This method is meant to be called at the end of an integration
This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.
s | current state of system | |
aClientData | General use pointer for sending in client data. |
Reimplemented from OpenSim::Analysis.
Storage * PointKinematics::getAccelerationStorage | ( | ) |
Get the acceleration storage.
Body * PointKinematics::getBody | ( | ) |
Get the body for which the induced accelerations are to be computed.
void PointKinematics::getPoint | ( | SimTK::Vec3 & | rPoint | ) |
Get the point for which the induced accelerations are to be computed.
rPoint | X-Y-Z Point |
const std::string & PointKinematics::getPointName | ( | ) |
Get the point name.
aName | Name for the point. |
Storage * PointKinematics::getPositionStorage | ( | ) |
Get the position storage.
Body * PointKinematics::getRelativeToBody | ( | ) |
Storage * PointKinematics::getVelocityStorage | ( | ) |
Get the velocity storage.
PointKinematics & PointKinematics::operator= | ( | const PointKinematics & | aPointKinematics | ) |
Assign this object to the values of another.
Reimplemented from OpenSim::Analysis.
virtual int OpenSim::PointKinematics::printResults | ( | const std::string & | aBaseName, | |
const std::string & | aDir = "" , |
|||
double | aDT = -1.0 , |
|||
const std::string & | aExtension = ".sto" | |||
) | [virtual] |
Print the results of the analysis.
aFileName | File to which to print the data. | |
aDT | Time interval between results (linear interpolation is used). If not included as an argument or negative, all time steps are printed without interpolation. |
Reimplemented from OpenSim::Analysis.
int PointKinematics::record | ( | const SimTK::State & | s | ) | [protected, virtual] |
Record the kinematics.
void PointKinematics::setBody | ( | Body * | aBody | ) |
void PointKinematics::setBodyPoint | ( | const std::string & | aBody, | |
const SimTK::Vec3 & | aPoint | |||
) |
void PointKinematics::setModel | ( | Model & | aModel | ) | [virtual] |
Set the model for which the point kinematics are to be computed.
aModel | Model pointer |
Reimplemented from OpenSim::Analysis.
void PointKinematics::setPoint | ( | const SimTK::Vec3 & | aPoint | ) |
Set the point for which the induced accelerations are to be computed.
aPoint | X-Y-Z Point |
void PointKinematics::setPointName | ( | const char * | aName | ) |
Set a name for the point.
aName | Name for the point. |
void PointKinematics::setRelativeToBody | ( | Body * | aBody | ) |
void PointKinematics::setStorageCapacityIncrements | ( | int | aIncrement | ) |
Set the capacity increments of all storage instances.
aIncrement | Increment by which storage capacities will be increased when storage capcities run out. |
int PointKinematics::step | ( | const SimTK::State & | s | ) | [virtual] |
This method is called to perform the analysis.
It can be called during the execution of a forward integrations or after the integration by feeding it the necessary data.
When called during an integration, this method is meant to be called
This method should be overriden in derived classes. It is included here so that the derived class will not have to implement it if it is not necessary.
s | current state of system | |
aClientData | General use pointer for sending in client data. |
Reimplemented from OpenSim::Analysis.
Storage* OpenSim::PointKinematics::_aStore [protected] |
std::string& OpenSim::PointKinematics::_bodyName [protected] |
PropertyStr OpenSim::PointKinematics::_bodyNameProp [protected] |
double* OpenSim::PointKinematics::_dy [protected] |
double* OpenSim::PointKinematics::_kin [protected] |
SimTK::Vec3& OpenSim::PointKinematics::_point [protected] |
std::string& OpenSim::PointKinematics::_pointName [protected] |
PropertyStr OpenSim::PointKinematics::_pointNameProp [protected] |
PropertyDblVec3 OpenSim::PointKinematics::_pointProp [protected] |
Storage* OpenSim::PointKinematics::_pStore [protected] |
std::string& OpenSim::PointKinematics::_relativeToBodyName [protected] |
Storage* OpenSim::PointKinematics::_vStore [protected] |
const int PointKinematics::BUFFER_LENGTH = PointKinematicsBUFFER_LENGTH [static] |
const int PointKinematics::NAME_LENGTH = PointKinematicsNAME_LENGTH [static] |
Reimplemented from OpenSim::Object.