OpenSim::WrapSphereObst Class Reference

A class implementing a sphere obstacle for muscle wrapping, based on the algorithm presented in Garner & Pandy (2000). More...

#include <WrapSphereObst.h>

Inheritance diagram for OpenSim::WrapSphereObst:
OpenSim::WrapObject OpenSim::Object

List of all members.

Public Member Functions

 WrapSphereObst ()
 Default constructor.
 WrapSphereObst (const WrapSphereObst &aWrapSphereObst)
 Copy constructor.
virtual ~WrapSphereObst ()
 Destructor.
virtual Objectcopy () const
 Copy this WrapSphereObst and return a pointer to the copy.
WrapSphereObstoperator= (const WrapSphereObst &aWrapSphereObst)
 Assignment operator.
void copyData (const WrapSphereObst &aWrapSphereObst)
 Copy data members from one WrapSphereObst to another.
double getRadius () const
void setRadius (double aRadius)
double getLength () const
void setLength (double aLength)
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 sphere located at the obstacle origin.

Protected Member Functions

void setupProperties ()
 Connect properties to local pointers.

Detailed Description

A class implementing a sphere obstacle for muscle wrapping, based on the algorithm presented in Garner & Pandy (2000).

Author:
Brian Garner, derivded from Peter Loan
Version:
0.1

Constructor & Destructor Documentation

WrapSphereObst::WrapSphereObst (  ) 

Default constructor.

WrapSphereObst::WrapSphereObst ( const WrapSphereObst aWrapSphereObst  ) 

Copy constructor.

Parameters:
aWrapSphereObst WrapSphereObst to be copied.
WrapSphereObst::~WrapSphereObst (  )  [virtual]

Destructor.


Member Function Documentation

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

Copy this WrapSphereObst and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this WrapSphereObst.

Implements OpenSim::WrapObject.

void WrapSphereObst::copyData ( const WrapSphereObst aWrapSphereObst  ) 

Copy data members from one WrapSphereObst to another.

Parameters:
aWrapSphereObst WrapSphereObst to be copied.

Reimplemented from OpenSim::WrapObject.

string WrapSphereObst::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.

Returns:
A string containing the dimensions of the wrap object

Reimplemented from OpenSim::WrapObject.

double OpenSim::WrapSphereObst::getLength (  )  const [inline]
double OpenSim::WrapSphereObst::getRadius (  )  const [inline]
const char * WrapSphereObst::getWrapTypeName (  )  const [virtual]

Get the name of the type of wrap object ("cylinderObst" in this case).

Returns:
A string representing the type of wrap object

Implements OpenSim::WrapObject.

WrapSphereObst & WrapSphereObst::operator= ( const WrapSphereObst aWrapSphereObst  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::WrapObject.

virtual void OpenSim::WrapSphereObst::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.

Parameters:
aScaleFactors The XYZ scale factors.

Reimplemented from OpenSim::WrapObject.

void OpenSim::WrapSphereObst::setLength ( double  aLength  )  [inline]
void OpenSim::WrapSphereObst::setRadius ( double  aRadius  )  [inline]
void WrapSphereObst::setup ( Model aModel,
OpenSim::Body aBody 
) [virtual]

Perform some set up functions that happen after the object has been deserialized or copied.

Parameters:
aModel point to OpenSim Model.

Reimplemented from OpenSim::WrapObject.

void WrapSphereObst::setupProperties ( void   )  [protected]

Connect properties to local pointers.

Reimplemented from OpenSim::WrapObject.

int WrapSphereObst::wrapLine ( const SimTK::State &  s,
SimTK::Vec3 &  aPoint1,
SimTK::Vec3 &  aPoint2,
const PathWrap aMuscleWrap,
WrapResult aWrapResult,
bool &  aFlag 
) const [virtual]

Calculate the wrapping of one line segment over the sphere located at the obstacle origin.

Parameters:
aPointP One end of the line segment, already expressed in obstacle frame
aPointS The other end of the line segment, already expressed in obstacle frame
aMuscleWrap 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.
Returns:
The status, as a WrapAction enum

Implements OpenSim::WrapObject.


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

Generated on Wed Dec 16 15:03:49 2009 for OpenSim by  doxygen 1.6.1