A class implementing a cylinder obstacle for muscle wrapping, based on algorithm presented in Garner & Pandy (2000). More...
#include <WrapDoubleCylinderObst.h>
Public Member Functions | |
WrapDoubleCylinderObst () | |
Default constructor. | |
WrapDoubleCylinderObst (const WrapDoubleCylinderObst &aWrapDoubleCylinderObst) | |
Copy constructor. | |
virtual | ~WrapDoubleCylinderObst () |
Destructor. | |
virtual Object * | copy () const |
Copy this WrapDoubleCylinderObst and return a pointer to the copy. | |
WrapDoubleCylinderObst & | operator= (const WrapDoubleCylinderObst &aWrapDoubleCylinderObst) |
Assignment operator. | |
void | copyData (const WrapDoubleCylinderObst &aWrapDoubleCylinderObst) |
Copy data members from one WrapDoubleCylinderObst to another. | |
double | getRadius () const |
void | setRadius (double aRadius) |
double | getLength () const |
void | setLength (double aLength) |
int | getWrapDirection () const |
virtual const char * | getWrapTypeName () const |
Get the name of the type of wrap object ("cylinderObst" in this case). | |
virtual std::string | getDimensionsString () const |
Get a string holding the dimensions definition that SIMM would use to describe this object. | |
virtual void | scale (const SimTK::Vec3 &aScaleFactors) |
Scale the wrap object by aScaleFactors. | |
virtual void | setup (Model &aModel, OpenSim::Body &aBody) |
Perform some set up functions that happen after the object has been deserialized or copied. | |
virtual int | wrapLine (const SimTK::State &s, SimTK::Vec3 &aPoint1, SimTK::Vec3 &aPoint2, const PathWrap &aPathWrap, WrapResult &aWrapResult, bool &aFlag) const |
Calculate the wrapping of one line segment over the cylinder oriented parallel to z-axis. | |
Protected Member Functions | |
void | setupProperties () |
Connect properties to local pointers. |
A class implementing a cylinder obstacle for muscle wrapping, based on algorithm presented in Garner & Pandy (2000).
WrapDoubleCylinderObst::WrapDoubleCylinderObst | ( | ) |
Default constructor.
WrapDoubleCylinderObst::WrapDoubleCylinderObst | ( | const WrapDoubleCylinderObst & | aWrapDoubleCylinderObst | ) |
Copy constructor.
aWrapDoubleCylinderObst | WrapDoubleCylinderObst to be copied. |
WrapDoubleCylinderObst::~WrapDoubleCylinderObst | ( | ) | [virtual] |
Destructor.
Object * WrapDoubleCylinderObst::copy | ( | ) | const [virtual] |
Copy this WrapDoubleCylinderObst and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::WrapObject.
void WrapDoubleCylinderObst::copyData | ( | const WrapDoubleCylinderObst & | aWrapDoubleCylinderObst | ) |
Copy data members from one WrapDoubleCylinderObst to another.
aWrapDoubleCylinderObst | WrapDoubleCylinderObst to be copied. |
Reimplemented from OpenSim::WrapObject.
string WrapDoubleCylinderObst::getDimensionsString | ( | ) | const [virtual] |
Get a string holding the dimensions definition that SIMM would use to describe this object.
This is a rather ugly convenience function for outputting SIMM joint files.
Reimplemented from OpenSim::WrapObject.
double OpenSim::WrapDoubleCylinderObst::getLength | ( | ) | const [inline] |
double OpenSim::WrapDoubleCylinderObst::getRadius | ( | ) | const [inline] |
int OpenSim::WrapDoubleCylinderObst::getWrapDirection | ( | ) | const [inline] |
const char * WrapDoubleCylinderObst::getWrapTypeName | ( | ) | const [virtual] |
Get the name of the type of wrap object ("cylinderObst" in this case).
Implements OpenSim::WrapObject.
WrapDoubleCylinderObst & WrapDoubleCylinderObst::operator= | ( | const WrapDoubleCylinderObst & | aWrapDoubleCylinderObst | ) |
virtual void OpenSim::WrapDoubleCylinderObst::scale | ( | const SimTK::Vec3 & | aScaleFactors | ) | [inline, virtual] |
Scale the wrap object by aScaleFactors.
This base class method scales only the _translation property, which is a local member. The derived classes are expected to scale the object itself, because they contain the object's dimensions.
aScaleFactors | The XYZ scale factors. |
Reimplemented from OpenSim::WrapObject.
void OpenSim::WrapDoubleCylinderObst::setLength | ( | double | aLength | ) | [inline] |
void OpenSim::WrapDoubleCylinderObst::setRadius | ( | double | aRadius | ) | [inline] |
void WrapDoubleCylinderObst::setup | ( | Model & | aModel, | |
OpenSim::Body & | aBody | |||
) | [virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | simbody model |
Reimplemented from OpenSim::WrapObject.
void WrapDoubleCylinderObst::setupProperties | ( | void | ) | [protected] |
Connect properties to local pointers.
Reimplemented from OpenSim::WrapObject.
int WrapDoubleCylinderObst::wrapLine | ( | const SimTK::State & | s, | |
SimTK::Vec3 & | aPoint1, | |||
SimTK::Vec3 & | aPoint2, | |||
const PathWrap & | aPathWrap, | |||
WrapResult & | aWrapResult, | |||
bool & | aFlag | |||
) | const [virtual] |
Calculate the wrapping of one line segment over the cylinder oriented parallel to z-axis.
aPointP | One end of the line segment, already expressed in cylinder frame | |
aPointS | The other end of the line segment, already expressed in cylinder frame | |
aPathWrap | An object holding the parameters for this line/cylinder pairing | |
aWrapResult | The result of the wrapping (tangent points, etc.) | |
aFlag | A flag for indicating errors, etc. |
Implements OpenSim::WrapObject.