A class implementing a sphere for muscle wrapping. More...
#include <WrapSphere.h>
Public Member Functions | |
WrapSphere () | |
Default constructor. | |
WrapSphere (const WrapSphere &aWrapSphere) | |
Copy constructor. | |
virtual | ~WrapSphere () |
Destructor. | |
virtual Object * | copy () const |
Copy this WrapSphere and return a pointer to the copy. | |
WrapSphere & | operator= (const WrapSphere &aWrapSphere) |
Assignment operator. | |
void | copyData (const WrapSphere &aWrapSphere) |
Copy data members from one WrapSphere to another. | |
virtual const char * | getWrapTypeName () const |
Get the name of the type of wrap object ("sphere" in this case). | |
virtual std::string | getDimensionsString () const |
Get a string holding the dimensions definition that SIMM would use to describe this object. | |
double | getRadius () const |
Get the radius of the sphere. | |
virtual void | scale (const SimTK::Vec3 &aScaleFactors) |
Scale the sphere by the average of the three scale factors. | |
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 sphere. | |
Protected Member Functions | |
void | setupProperties () |
Connect properties to local pointers. |
A class implementing a sphere for muscle wrapping.
WrapSphere::WrapSphere | ( | ) |
Default constructor.
WrapSphere::WrapSphere | ( | const WrapSphere & | aWrapSphere | ) |
Copy constructor.
aWrapSphere | WrapSphere to be copied. |
WrapSphere::~WrapSphere | ( | ) | [virtual] |
Destructor.
Object * WrapSphere::copy | ( | ) | const [virtual] |
Copy this WrapSphere and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::WrapObject.
void WrapSphere::copyData | ( | const WrapSphere & | aWrapSphere | ) |
Copy data members from one WrapSphere to another.
aWrapSphere | WrapSphere to be copied. |
Reimplemented from OpenSim::WrapObject.
string WrapSphere::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 WrapSphere::getRadius | ( | ) | const |
Get the radius of the sphere.
const char * WrapSphere::getWrapTypeName | ( | ) | const [virtual] |
Get the name of the type of wrap object ("sphere" in this case).
Implements OpenSim::WrapObject.
WrapSphere & WrapSphere::operator= | ( | const WrapSphere & | aWrapSphere | ) |
void WrapSphere::scale | ( | const SimTK::Vec3 & | aScaleFactors | ) | [virtual] |
Scale the sphere by the average of the three scale factors.
The base class scales the origin of the sphere in the body's reference frame.
aScaleFactors | The XYZ scale factors. |
Reimplemented from OpenSim::WrapObject.
void WrapSphere::setup | ( | Model & | aModel, | |
OpenSim::Body & | aBody | |||
) | [virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aModel | OpenSim model. |
Reimplemented from OpenSim::WrapObject.
void WrapSphere::setupProperties | ( | void | ) | [protected] |
Connect properties to local pointers.
Reimplemented from OpenSim::WrapObject.
int WrapSphere::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 sphere.
aPoint1 | One end of the line segment | |
aPoint2 | The other end of the line segment | |
aPathWrap | An object holding the parameters for this line/sphere pairing | |
aWrapResult | The result of the wrapping (tangent points, etc.) | |
aFlag | A flag for indicating errors, etc. |
Implements OpenSim::WrapObject.