OpenSim::PointToPointSpring Class Reference

#include <PointToPointSpring.h>

Inheritance diagram for OpenSim::PointToPointSpring:
OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 PointToPointSpring ()
 Default constructor.
 PointToPointSpring (std::string body1Name, SimTK::Vec3 point1, std::string body2Name, SimTK::Vec3 point2, double stiffness, double restlength)
 PointToPointSpring (const PointToPointSpring &aPointToPointSpring)
 Copy constructor.
virtual ~PointToPointSpring ()
 Destructor.
virtual Objectcopy () const
 Copy this force and return a pointer to the copy.
void copyData (const PointToPointSpring &aPointToPointSpring)
 Copy the member data of the specified force.
virtual VisibleObjectgetDisplayer () const
 Get the visible object used to represent the spring.
virtual void updateDisplayer (const SimTK::State &s)
 In case the ModelCompoenent has a visual representation, override this method to update the representation, typically this's done by recomputing anchor points and positions based on transforms obtained from current state.
virtual void updateGeometry (const SimTK::State &s)
PointToPointSpringoperator= (const PointToPointSpring &aGenForce)
 Assignment operator.
void setBody1Name (std::string body1Name)
 Spring end point bodies.
void setBody2Name (std::string body2Name)
std::string getBody1Name () const
std::string getBody2Name () const
void setPoint1 (SimTK::Vec3 aPosition)
 Spring end points.
SimTK::Vec3 getPoint1 () const
void setPoint2 (SimTK::Vec3 aPosition)
SimTK::Vec3 getPoint2 () const
void setStiffness (double stiffness)
 Spring stiffness.
double getStiffness () const
void setRestlength (double restLength)
 Spring rest length.
double getRestlength () const
void setup (Model &model)
 Subclasses should override these methods appropriately.
void createSystem (SimTK::MultibodySystem &system) const
 Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component.
virtual OpenSim::Array
< std::string > 
getRecordLabels () const
 Provide name(s) of the quantities (column labels) of the force value(s) to be reported.
virtual OpenSim::Array< double > getRecordValues (const SimTK::State &state) const
 Provide the value(s) to be reported that correspond to the labels.
 OPENSIM_DECLARE_DERIVED (PointToPointSpring, Force)

Protected Attributes

PropertyStr _propBody1Name
 Name of Body to which 1 end of the spring is attached.
PropertyStr _propBody2Name
 Name of Body to which the 2nd end of the spring is attached.
PropertyDblVec3 _propPoint1
 Point of spring application on each body.
PropertyDblVec3 _propPoint2
PropertyDbl _propStiffness
 Spring stiffness property.
PropertyDbl _propRestlength
 Spring rest length property.
std::string & _body1Name
 Names of bodies to which ends of the spring are attached.
std::string & _body2Name
SimTK::Vec3 & _point1
 Points of application on each body.
SimTK::Vec3 & _point2
double & _stiffness
 Spring stiffness.
double & _restLength
 Spring rest length.
VisibleObject _displayer
 how to display the Spring

Constructor & Destructor Documentation

PointToPointSpring::PointToPointSpring (  ) 

Default constructor.

OpenSim::PointToPointSpring::PointToPointSpring ( std::string  body1Name,
SimTK::Vec3  point1,
std::string  body2Name,
SimTK::Vec3  point2,
double  stiffness,
double  restlength 
)
PointToPointSpring::PointToPointSpring ( const PointToPointSpring aForce  ) 

Copy constructor.

Parameters:
aForce force to be copied.
PointToPointSpring::~PointToPointSpring (  )  [virtual]

Destructor.


Member Function Documentation

Object * PointToPointSpring::copy (  )  const [virtual]

Copy this force and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this force.

Implements OpenSim::Force.

void PointToPointSpring::copyData ( const PointToPointSpring aPointToPointSpring  ) 

Copy the member data of the specified force.

Parameters:
aPointToPointSpring PointToPointSpring providing the data to be copied

Reimplemented from OpenSim::Force.

void PointToPointSpring::createSystem ( SimTK::MultibodySystem &  system  )  const [virtual]

Default is to create a ForceAdapter which is a SimTK::Force::Custom as the udnerlying computational component.

Create an underlying SimTK::Force to represent the OpenSim::Force in the computational system.

Subclasses override to employ other SimTK::Forces.

Create a SimTK::Force::Custom by default.

Reimplemented from OpenSim::Force.

std::string OpenSim::PointToPointSpring::getBody1Name (  )  const [inline]
std::string OpenSim::PointToPointSpring::getBody2Name (  )  const [inline]
VisibleObject * PointToPointSpring::getDisplayer (  )  const [virtual]

Get the visible object used to represent the spring.

Reimplemented from OpenSim::Object.

SimTK::Vec3 OpenSim::PointToPointSpring::getPoint1 (  )  const [inline]
SimTK::Vec3 OpenSim::PointToPointSpring::getPoint2 (  )  const [inline]
OpenSim::Array< std::string > PointToPointSpring::getRecordLabels (  )  const [virtual]

Provide name(s) of the quantities (column labels) of the force value(s) to be reported.

Provide names of the quantities (column labels) of the force value(s) reported.

Reimplemented from OpenSim::Force.

OpenSim::Array< double > PointToPointSpring::getRecordValues ( const SimTK::State &  state  )  const [virtual]

Provide the value(s) to be reported that correspond to the labels.

Reimplemented from OpenSim::Force.

double OpenSim::PointToPointSpring::getRestlength (  )  const [inline]
double OpenSim::PointToPointSpring::getStiffness (  )  const [inline]
OpenSim::PointToPointSpring::OPENSIM_DECLARE_DERIVED ( PointToPointSpring  ,
Force   
)
PointToPointSpring & PointToPointSpring::operator= ( const PointToPointSpring aPointToPointSpring  ) 

Assignment operator.

Returns:
aBodyID ID (or number, or index) of the generalized Body.

Reimplemented from OpenSim::Force.

void OpenSim::PointToPointSpring::setBody1Name ( std::string  body1Name  )  [inline]

Spring end point bodies.

Parameters:
std::string bodyName<1/2>
void OpenSim::PointToPointSpring::setBody2Name ( std::string  body2Name  )  [inline]
void OpenSim::PointToPointSpring::setPoint1 ( SimTK::Vec3  aPosition  )  [inline]

Spring end points.

Parameters:
Vec3 point<1/2>
void OpenSim::PointToPointSpring::setPoint2 ( SimTK::Vec3  aPosition  )  [inline]
void OpenSim::PointToPointSpring::setRestlength ( double  restLength  )  [inline]

Spring rest length.

Parameters:
restLength 
void OpenSim::PointToPointSpring::setStiffness ( double  stiffness  )  [inline]

Spring stiffness.

Parameters:
stiffness 
void PointToPointSpring::setup ( Model model  )  [virtual]

Subclasses should override these methods appropriately.

Reimplemented from OpenSim::Force.

void PointToPointSpring::updateDisplayer ( const SimTK::State &  s  )  [virtual]

In case the ModelCompoenent has a visual representation, override this method to update the representation, typically this's done by recomputing anchor points and positions based on transforms obtained from current state.

Reimplemented from OpenSim::ModelComponent.

void PointToPointSpring::updateGeometry ( const SimTK::State &  s  )  [virtual]

Member Data Documentation

std::string& OpenSim::PointToPointSpring::_body1Name [protected]

Names of bodies to which ends of the spring are attached.

std::string& OpenSim::PointToPointSpring::_body2Name [protected]

how to display the Spring

SimTK::Vec3& OpenSim::PointToPointSpring::_point1 [protected]

Points of application on each body.

SimTK::Vec3& OpenSim::PointToPointSpring::_point2 [protected]

Name of Body to which 1 end of the spring is attached.

Name of Body to which the 2nd end of the spring is attached.

Point of spring application on each body.

Spring rest length property.

Spring stiffness property.

Spring rest length.

Spring stiffness.


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

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