OpenSim::Marker Class Reference

A class implementing a SIMM [mocap] marker. More...

#include <Marker.h>

Inheritance diagram for OpenSim::Marker:
OpenSim::Object

List of all members.

Public Member Functions

 Marker ()
 Default constructor.
 Marker (const Marker &aMarker)
 Copy constructor.
virtual ~Marker ()
 Destructor.
virtual Objectcopy () const
 Copy this Marker and return a pointer to the copy.
Markeroperator= (const Marker &aMarker)
 Assignment operator.
void copyData (const Marker &aMarker)
 Copy data members from one Marker to another.
virtual void updateFromMarker (const Marker &aMarker)
 Update an existing marker with parameter values from a new one, but only for the parameters that were explicitly specified in the XML node.
virtual void getOffset (SimTK::Vec3 &rOffset) const
 Get the marker's XYZ offset from the body it's attached to.
virtual const SimTK::Vec3 & getOffset () const
virtual void getOffset (double rOffset[]) const
 Get the marker's XYZ offset from the body it's attached to.
virtual bool setOffset (const SimTK::Vec3 &aOffset)
 Set the marker's XYZ offset from the body it's attached to.
virtual bool setOffset (const double aOffset[3])
 Set the marker's XYZ offset from the body it's attached to.
virtual bool getOffsetUseDefault () const
virtual bool getFixed () const
virtual bool setFixed (bool aFixed)
 Set the marker's fixed status.
virtual bool getFixedUseDefault () const
virtual const std::string & getBodyName () const
 Get the 'body name' field, which is used when the marker is added to an existing model.
virtual bool setBodyName (const std::string &aName)
virtual bool getBodyNameUseDefault () const
virtual bool setBodyNameUseDefault (bool aValue)
 Set the 'body name' field to use or not use the default value.
virtual OpenSim::BodygetBody () const
virtual void changeBody (OpenSim::Body &aBody)
 Change the body that this marker is attached to.
virtual void changeBodyPreserveLocation (const SimTK::State &s, OpenSim::Body &aBody)
 Change the body that this marker is attached to.
virtual void scale (const SimTK::Vec3 &aScaleFactors)
 Scale the marker.
virtual void setup (const Model &aModel)
 Perform some set up functions that happen after the object has been deserialized or copied.
virtual void updateGeometry ()
 Update the geometry to correspond to position changes.
virtual const VisibleObjectgetDisplayer () const
virtual VisibleObjectupdDisplayer ()
virtual void removeSelfFromDisplay ()
 Remove self from the list of displayable objects and free resources.
const bool isVirtual ()
void setVirtual (bool aTrueFalse)
 OPENSIM_DECLARE_DERIVED (Marker, Object)

Static Public Member Functions

static void deleteMarker (Marker *aMarker)

Protected Attributes

const Model_model
PropertyDblVec3 _offsetProp
SimTK::Vec3 & _offset
PropertyBool _fixedProp
bool & _fixed
PropertyStr _bodyNameProp
std::string & _bodyName
OpenSim::Body_body
PropertyObj _displayerProp
VisibleObject_displayer
bool _virtual

Static Protected Attributes

static Geometry_defaultGeometry = AnalyticSphere::createSphere(0.01)
 A temporary kluge until the default mechanism is working.

Detailed Description

A class implementing a SIMM [mocap] marker.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

Marker::Marker (  ) 

Default constructor.

Marker::Marker ( const Marker aMarker  ) 

Copy constructor.

Parameters:
aMarker Marker to be copied.
Marker::~Marker (  )  [virtual]

Destructor.


Member Function Documentation

void Marker::changeBody ( OpenSim::Body aBody  )  [virtual]

Change the body that this marker is attached to.

It assumes that the body is already set, so that setup() needs to be called to update dependent information.

Parameters:
aBody Reference to the body.
void Marker::changeBodyPreserveLocation ( const SimTK::State &  s,
OpenSim::Body aBody 
) [virtual]

Change the body that this marker is attached to.

It assumes that the body is already set, so that setup() needs to be called to update dependent information.

Parameters:
s State.
aBody Reference to the body.
Object * Marker::copy (  )  const [virtual]

Copy this Marker and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this Marker.

Reimplemented from OpenSim::Object.

void Marker::copyData ( const Marker aMarker  ) 

Copy data members from one Marker to another.

Parameters:
aMarker Marker to be copied.
static void OpenSim::Marker::deleteMarker ( Marker aMarker  )  [inline, static]
virtual OpenSim::Body& OpenSim::Marker::getBody (  )  const [inline, virtual]
const string & Marker::getBodyName (  )  const [virtual]

Get the 'body name' field, which is used when the marker is added to an existing model.

Returns:
Pointer to the body name.
virtual bool OpenSim::Marker::getBodyNameUseDefault (  )  const [inline, virtual]
virtual const VisibleObject* OpenSim::Marker::getDisplayer (  )  const [inline, virtual]

Reimplemented from OpenSim::Object.

virtual bool OpenSim::Marker::getFixed (  )  const [inline, virtual]
virtual bool OpenSim::Marker::getFixedUseDefault (  )  const [inline, virtual]
void Marker::getOffset ( double  rOffset[]  )  const [virtual]

Get the marker's XYZ offset from the body it's attached to.

Parameters:
rOffset XYZ offset is returned here.
virtual const SimTK::Vec3& OpenSim::Marker::getOffset (  )  const [inline, virtual]
void Marker::getOffset ( SimTK::Vec3 &  rOffset  )  const [virtual]

Get the marker's XYZ offset from the body it's attached to.

Parameters:
rOffset XYZ offset is returned here.
virtual bool OpenSim::Marker::getOffsetUseDefault (  )  const [inline, virtual]
const bool OpenSim::Marker::isVirtual (  )  [inline]
OpenSim::Marker::OPENSIM_DECLARE_DERIVED ( Marker  ,
Object   
)
Marker & Marker::operator= ( const Marker aMarker  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

void Marker::removeSelfFromDisplay (  )  [virtual]

Remove self from the list of displayable objects and free resources.

void Marker::scale ( const SimTK::Vec3 &  aScaleFactors  )  [virtual]

Scale the marker.

Parameters:
aScaleFactors XYZ scale factors.
virtual bool OpenSim::Marker::setBodyName ( const std::string &  aName  )  [virtual]
bool Marker::setBodyNameUseDefault ( bool  aValue  )  [virtual]

Set the 'body name' field to use or not use the default value.

Returns:
Whether or not the flag was set properly.
bool Marker::setFixed ( bool  aFixed  )  [virtual]

Set the marker's fixed status.

Parameters:
aFixed boolean value to set to.
Returns:
Whether or not the fixed status was set.
bool Marker::setOffset ( const double  aOffset[3]  )  [virtual]

Set the marker's XYZ offset from the body it's attached to.

Parameters:
aOffset XYZ offset to set to.
Returns:
Whether or not the offset was set.
bool Marker::setOffset ( const SimTK::Vec3 &  aOffset  )  [virtual]

Set the marker's XYZ offset from the body it's attached to.

Parameters:
aOffset XYZ offset to set to.
Returns:
Whether or not the offset was set.
void Marker::setup ( const Model aModel  )  [virtual]

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

Parameters:
aEngine dynamics engine containing this Marker.
void OpenSim::Marker::setVirtual ( bool  aTrueFalse  )  [inline]
void Marker::updateFromMarker ( const Marker aMarker  )  [virtual]

Update an existing marker with parameter values from a new one, but only for the parameters that were explicitly specified in the XML node.

Parameters:
aMarker marker to update from
void Marker::updateGeometry (  )  [virtual]

Update the geometry to correspond to position changes.

virtual VisibleObject* OpenSim::Marker::updDisplayer (  )  [inline, virtual]

Reimplemented from OpenSim::Object.


Member Data Documentation

std::string& OpenSim::Marker::_bodyName [protected]
Geometry * Marker::_defaultGeometry = AnalyticSphere::createSphere(0.01) [static, protected]

A temporary kluge until the default mechanism is working.

bool& OpenSim::Marker::_fixed [protected]
const Model* OpenSim::Marker::_model [protected]
SimTK::Vec3& OpenSim::Marker::_offset [protected]
bool OpenSim::Marker::_virtual [protected]

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

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