OpenSim  OpenSim 3.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
OpenSim::MovingPathPoint Class Reference

A class implementing a moving muscle point, which is a muscle point that moves in a body's reference frame as a function of a coordinate. More...

#include <MovingPathPoint.h>

Inheritance diagram for OpenSim::MovingPathPoint:
OpenSim::PathPoint OpenSim::Object

Public Member Functions

 MovingPathPoint ()
 MovingPathPoint (const MovingPathPoint &aPoint)
virtual ~MovingPathPoint ()
MovingPathPointoperator= (const MovingPathPoint &aPoint)
void copyData (const MovingPathPoint &aPoint)
virtual void updateFromXMLNode (SimTK::Xml::Element &aNode, int versionNumber)
 Use this method to deserialize an object from a SimTK::Xml::Element.
virtual void init (const PathPoint &aPoint)
const CoordinategetXCoordinate () const
const CoordinategetYCoordinate () const
const CoordinategetZCoordinate () const
void setXCoordinate (const SimTK::State &s, Coordinate &aCoordinate)
void setYCoordinate (const SimTK::State &s, Coordinate &aCoordinate)
void setZCoordinate (const SimTK::State &s, Coordinate &aCoordinate)
bool isActive (const SimTK::State &s) const override
void connectToModelAndPath (const Model &aModel, GeometryPath &aPath) override
void update (const SimTK::State &s) override
void getVelocity (const SimTK::State &s, SimTK::Vec3 &aVelocity) override
const std::string & getXCoordinateName () const
const std::string & getYCoordinateName () const
const std::string & getZCoordinateName () const
virtual FunctiongetXFunction () const
virtual FunctiongetYFunction () const
virtual FunctiongetZFunction () const
void setXFunction (const SimTK::State &s, Function &aFunction)
void setYFunction (const SimTK::State &s, Function &aFunction)
void setZFunction (const SimTK::State &s, Function &aFunction)
virtual void scale (const SimTK::State &s, const SimTK::Vec3 &aScaleFactors)
- Public Member Functions inherited from OpenSim::PathPoint
 PathPoint ()
 PathPoint (const PathPoint &aPoint)
virtual ~PathPoint ()
PathPointoperator= (const PathPoint &aPoint)
void copyData (const PathPoint &aPoint)
const SimTK::Vec3 & getLocation () const
SimTK::Vec3 & getLocation ()
const double & getLocationCoord (int aXYZ) const
void setLocationCoord (int aXYZ, double aValue)
void setLocation (const SimTK::State &s, const SimTK::Vec3 &aLocation)
void setLocation (const SimTK::State &s, int aCoordIndex, double aLocation)
void setLocation (const SimTK::State &s, double pt[])
void setBody (OpenSim::Body &aBody)
void changeBodyPreserveLocation (const SimTK::State &s, OpenSim::Body &aBody)
OpenSim::BodygetBody () const
const std::string & getBodyName () const
GeometryPathgetPath () const
virtual WrapObject * getWrapObject () const
virtual const VisibleObjectgetDisplayer () const
 Methods to support making the object displayable in the GUI or Visualizer Implemented only in few objects.
virtual VisibleObjectupdDisplayer ()
 get Non const pointer to VisibleObject
virtual void updateGeometry ()
- Public Member Functions inherited from OpenSim::Object
virtual ~Object ()
 Virtual destructor for cleanup.
virtual Objectclone () const =0
 Create a new heap-allocated copy of the concrete object to which this Object refers.
virtual const std::string & getConcreteClassName () const =0
 Returns the class name of the concrete Object-derived class of the actual object referenced by this Object, as a string.
bool isEqualTo (const Object &aObject) const
 Equality operator wrapper for use from languages not supporting operator overloading.
Objectoperator= (const Object &aObject)
 Copy assignment copies he base class fields, including the properties.
virtual bool operator== (const Object &aObject) const
 Determine if two objects are equal.
virtual bool operator< (const Object &aObject) const
 Provide an ordering for objects so they can be put in sorted containers.
void setName (const std::string &name)
 Set the name of the Object.
const std::string & getName () const
 Get the name of this Object.
void setDescription (const std::string &description)
 Set description, a one-liner summary.
const std::string & getDescription () const
 Get description, a one-liner summary.
const std::string & getAuthors () const
 Get Authors of this Object.
void setAuthors (const std::string &authors)
 Set Authors of this object, call this method in your constructor if needed.
const std::string & getReferences () const
 Get references or publications to cite if using this object.
void setReferences (const std::string &references)
 Set references or publications to cite if using this object.
int getNumProperties () const
 Determine how many properties are stored with this Object.
const AbstractPropertygetPropertyByIndex (int propertyIndex) const
 Get a const reference to a property by its index number, returned as an AbstractProperty.
AbstractPropertyupdPropertyByIndex (int propertyIndex)
 Get a writable reference to a property by its index number, returned as an AbstractProperty.
bool hasProperty (const std::string &name) const
 Return true if this Object has a property of any type with the given name, which must not be empty.
const AbstractPropertygetPropertyByName (const std::string &name) const
 Get a const reference to a property by its name, returned as an AbstractProperty.
AbstractPropertyupdPropertyByName (const std::string &name)
 Get a writable reference to a property by its name, returned as an AbstractProperty.
template<class T >
bool hasProperty () const
 Return true if this Object contains an unnamed, one-object property that contains objects of the given template type T.
template<class T >
const Property< T > & getProperty (const PropertyIndex &index) const
 Get property of known type Property<T> as a const reference; the property must be present and have the right type.
template<class T >
Property< T > & updProperty (const PropertyIndex &index)
 Get property of known type Property<T> as a writable reference; the property must be present and have the right type.
void setObjectIsUpToDateWithProperties ()
 When an object is initialized using the current values of its properties, it can set a flag indicating that it is up to date.
bool isObjectUpToDateWithProperties () const
 Returns true if no property's value has changed since the last time setObjectIsUpToDateWithProperties() was called.
void readObjectFromXMLNodeOrFile (SimTK::Xml::Element &objectElement, int versionNumber)
 We're given an XML element from which we are to populate this Object.
virtual void updateXMLNode (SimTK::Xml::Element &parent)
 Serialize this object into the XML node that represents it.
bool getInlined () const
 Inlined means an in-memory Object that is not associated with an XMLDocument.
void setInlined (bool aInlined, const std::string &aFileName="")
 Mark this as inlined or not and optionally provide a file name to associate with the new XMLDocument for the non-inline case.
std::string getDocumentFileName () const
 If there is a document associated with this object then return the file name maintained by the document.
void setAllPropertiesUseDefault (bool aUseDefault)
bool print (const std::string &fileName)
 Write this Object into an XML file of the given name; conventionally the suffix to use is ".osim".
std::string dump (bool dumpName=false)
 dump the XML representation of this Object into an std::string and return it.
void clearObjectIsUpToDateWithProperties ()
 For testing or debugging purposes, manually clear the "object is up to date with respect to properties" flag.
virtual bool isA (const char *type) const
 The default implementation returns true only if the supplied string is "Object"; each Object-derived class overrides this to match its own class name.
const std::string & toString () const
 Wrapper to be used on Java side to display objects in tree; this returns just the object's name.
PropertySetgetPropertySet ()
 OBSOLETE: Get a reference to the PropertySet maintained by the Object.
const PropertySetgetPropertySet () const

Protected Attributes

PropertyObjPtr< Function_xLocationProp
Function *& _xLocation
PropertyStr _xCoordinateNameProp
std::string & _xCoordinateName
const Coordinate_xCoordinate
PropertyObjPtr< Function_yLocationProp
Function *& _yLocation
PropertyStr _yCoordinateNameProp
std::string & _yCoordinateName
const Coordinate_yCoordinate
PropertyObjPtr< Function_zLocationProp
Function *& _zLocation
PropertyStr _zCoordinateNameProp
std::string & _zCoordinateName
const Coordinate_zCoordinate
- Protected Attributes inherited from OpenSim::PathPoint
const Model_model
PropertyDblVec3 _locationProp
SimTK::Vec3 & _location
PropertyStr _bodyNameProp
std::string & _bodyName
VisibleObject _displayer
OpenSim::Body_body
GeometryPath_path
- Protected Attributes inherited from OpenSim::Object
PropertySet _propertySet
 OBSOLETE: Property_Deprecated set for serializable member variables of this and derived classes.

Additional Inherited Members

- Static Public Member Functions inherited from OpenSim::PathPoint
static PathPointmakePathPointOfType (PathPoint *aPoint, const std::string &aNewTypeName)
static void deletePathPoint (PathPoint *aPoint)
- Static Public Attributes inherited from OpenSim::Object
static const std::string DEFAULT_NAME
 Name used for default objects when they are serialized.
- Protected Member Functions inherited from OpenSim::Object
 Object ()
 The default constructor is only for use by constructors of derived types.
 Object (const std::string &fileName, bool aUpdateFromXMLNode=true) SWIG_DECLARE_EXCEPTION
 Constructor from a file, to be called from other constructors that take a file as input.
 Object (const Object &source)
 Copy constructor is invoked automatically by derived classes with default copy constructors; otherwise it must be invoked explicitly.
 Object (SimTK::Xml::Element &aElement)
 Construct the base class portion of an Object from a given Xml element that describes this Object.
template<class T >
PropertyIndex addProperty (const std::string &name, const std::string &comment, const T &value)
 Define a new single-value property of known type T, with the given name, associated comment, and initial value.
template<class T >
PropertyIndex addOptionalProperty (const std::string &name, const std::string &comment)
 Add an optional property, meaning it can contain either no value or a single value.
template<class T >
PropertyIndex addOptionalProperty (const std::string &name, const std::string &comment, const T &value)
 Add an optional property, meaning it can contain either no value or a single value.
template<class T >
PropertyIndex addListProperty (const std::string &name, const std::string &comment, int minSize, int maxSize)
 Define a new list-valued property of known type T, with the given name, associated comment, minimum (==0) and maximum (>0) allowable list lengths, and a zero-length initial value.
template<class T , template< class > class Container>
PropertyIndex addListProperty (const std::string &name, const std::string &comment, int minSize, int maxSize, const Container< T > &valueList)
 Define a new list-valued property as above, but assigning an initial value via some templatized container class that supports size() and indexing.
PropertyIndex getPropertyIndex (const std::string &name) const
 Look up a property by name and return its PropertyIndex if it is found.
template<class T >
PropertyIndex getPropertyIndex () const
 Look up an unnamed property by the type of object it contains, and return its PropertyIndex if it is found.
void updateFromXMLDocument ()
 Use this method only if you're deserializing from a file and the object is at the top level; that is, primarily in constructors that take a file name as input.
void setDocument (XMLDocument *doc)
 Unconditionally set the XMLDocument associated with this object.
const XMLDocumentgetDocument () const
 Get a const pointer to the document (if any) associated with this object.
XMLDocumentupdDocument ()
 Get a writable pointer to the document (if any) associated with this object.
- Static Protected Attributes inherited from OpenSim::PathPoint
static Geometry_defaultGeometry
 A temporary kluge until the default mechanism is working.

Detailed Description

A class implementing a moving muscle point, which is a muscle point that moves in a body's reference frame as a function of a coordinate.

Author
Peter Loan
Version
1.0

Constructor & Destructor Documentation

OpenSim::MovingPathPoint::MovingPathPoint ( )
OpenSim::MovingPathPoint::MovingPathPoint ( const MovingPathPoint aPoint)
virtual OpenSim::MovingPathPoint::~MovingPathPoint ( )
virtual

Member Function Documentation

void OpenSim::MovingPathPoint::connectToModelAndPath ( const Model aModel,
GeometryPath aPath 
)
overridevirtual

Reimplemented from OpenSim::PathPoint.

void OpenSim::MovingPathPoint::copyData ( const MovingPathPoint aPoint)
void OpenSim::MovingPathPoint::getVelocity ( const SimTK::State &  s,
SimTK::Vec3 &  aVelocity 
)
overridevirtual

Reimplemented from OpenSim::PathPoint.

const Coordinate* OpenSim::MovingPathPoint::getXCoordinate ( ) const
inline
const std::string& OpenSim::MovingPathPoint::getXCoordinateName ( ) const
inline
virtual Function* OpenSim::MovingPathPoint::getXFunction ( ) const
inlinevirtual
const Coordinate* OpenSim::MovingPathPoint::getYCoordinate ( ) const
inline
const std::string& OpenSim::MovingPathPoint::getYCoordinateName ( ) const
inline
virtual Function* OpenSim::MovingPathPoint::getYFunction ( ) const
inlinevirtual
const Coordinate* OpenSim::MovingPathPoint::getZCoordinate ( ) const
inline
const std::string& OpenSim::MovingPathPoint::getZCoordinateName ( ) const
inline
virtual Function* OpenSim::MovingPathPoint::getZFunction ( ) const
inlinevirtual
virtual void OpenSim::MovingPathPoint::init ( const PathPoint aPoint)
virtual

Reimplemented from OpenSim::PathPoint.

bool OpenSim::MovingPathPoint::isActive ( const SimTK::State &  s) const
inlineoverridevirtual

Reimplemented from OpenSim::PathPoint.

MovingPathPoint& OpenSim::MovingPathPoint::operator= ( const MovingPathPoint aPoint)
virtual void OpenSim::MovingPathPoint::scale ( const SimTK::State &  s,
const SimTK::Vec3 &  aScaleFactors 
)
virtual

Reimplemented from OpenSim::PathPoint.

void OpenSim::MovingPathPoint::setXCoordinate ( const SimTK::State &  s,
Coordinate aCoordinate 
)
void OpenSim::MovingPathPoint::setXFunction ( const SimTK::State &  s,
Function aFunction 
)
void OpenSim::MovingPathPoint::setYCoordinate ( const SimTK::State &  s,
Coordinate aCoordinate 
)
void OpenSim::MovingPathPoint::setYFunction ( const SimTK::State &  s,
Function aFunction 
)
void OpenSim::MovingPathPoint::setZCoordinate ( const SimTK::State &  s,
Coordinate aCoordinate 
)
void OpenSim::MovingPathPoint::setZFunction ( const SimTK::State &  s,
Function aFunction 
)
void OpenSim::MovingPathPoint::update ( const SimTK::State &  s)
overridevirtual

Reimplemented from OpenSim::PathPoint.

virtual void OpenSim::MovingPathPoint::updateFromXMLNode ( SimTK::Xml::Element &  objectElement,
int  versionNumber 
)
virtual

Use this method to deserialize an object from a SimTK::Xml::Element.

The element is assumed to be in the format consistent with the passed-in versionNumber. If there is a file attribute in objectElement it will be ignored; if you want it processed you should call readObjectFromXMLNodeOrFile() instead.

Reimplemented from OpenSim::Object.

Member Data Documentation

const Coordinate* OpenSim::MovingPathPoint::_xCoordinate
protected
std::string& OpenSim::MovingPathPoint::_xCoordinateName
protected
PropertyStr OpenSim::MovingPathPoint::_xCoordinateNameProp
protected
Function* & OpenSim::MovingPathPoint::_xLocation
protected
PropertyObjPtr<Function> OpenSim::MovingPathPoint::_xLocationProp
protected
const Coordinate* OpenSim::MovingPathPoint::_yCoordinate
protected
std::string& OpenSim::MovingPathPoint::_yCoordinateName
protected
PropertyStr OpenSim::MovingPathPoint::_yCoordinateNameProp
protected
Function* & OpenSim::MovingPathPoint::_yLocation
protected
PropertyObjPtr<Function> OpenSim::MovingPathPoint::_yLocationProp
protected
const Coordinate* OpenSim::MovingPathPoint::_zCoordinate
protected
std::string& OpenSim::MovingPathPoint::_zCoordinateName
protected
PropertyStr OpenSim::MovingPathPoint::_zCoordinateNameProp
protected
Function* & OpenSim::MovingPathPoint::_zLocation
protected
PropertyObjPtr<Function> OpenSim::MovingPathPoint::_zLocationProp
protected

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