OpenSim::StepFunction Class Reference

A class for representing a StepFunction. More...

#include <StepFunction.h>

Inheritance diagram for OpenSim::StepFunction:
OpenSim::Function OpenSim::Object

List of all members.

Public Member Functions

 StepFunction ()
 Default constructor.
 StepFunction (double startTime, double endTime, double startValue=0.0, double endValue=1.0)
 StepFunction (const StepFunction &aSpline)
 Copy constructor.
virtual ~StepFunction ()
 Destructor.
virtual Objectcopy () const
 Copy this object.
StepFunctionoperator= (const StepFunction &aStepFunction)
 Assignment operator.
void setStartTime (double time)
 Set step transition start time.
double getStartTime () const
 Get step transition time.
void setEndTime (double time)
 Set step transition end time.
double getEndTime () const
 Get step transition time.
void setStartValue (double start)
 Set start value before step.
double getStartValue () const
 Get start value before step.
void setEndValue (double end)
 Set end value before step.
double getEndValue () const
 Get end value before step.
virtual SimTK::Function * createSimTKFunction () const
 OPENSIM_DECLARE_DERIVED (StepFunction, Function)

Protected Attributes

PropertyDbl _startTimeProp
double & _startTime
PropertyDbl _endTimeProp
double & _endTime
PropertyDbl _startValueProp
double & _startValue
PropertyDbl _endValueProp
double & _endValue

Detailed Description

A class for representing a StepFunction.

{ start_value, t <= start_time f(t) = { S-plolynomial(t), start_time < t < end_time { end_value, t >= end_time

This class inherits from Function and so can be used as input to any class requiring a Fuction as input.

Author:
Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

StepFunction::StepFunction (  ) 

Default constructor.

StepFunction::StepFunction ( double  startTime,
double  endTime,
double  startValue = 0.0,
double  endValue = 1.0 
)
StepFunction::StepFunction ( const StepFunction aStepFunction  ) 

Copy constructor.

All data members of the specified StepFunction are copied.

Parameters:
aStepFunction StepFunction object to be copied.
StepFunction::~StepFunction (  )  [virtual]

Destructor.


Member Function Documentation

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

Copy this object.

Returns:
Pointer to a copy of this object.

Implements OpenSim::Function.

SimTK::Function * StepFunction::createSimTKFunction (  )  const [virtual]

Implements OpenSim::Function.

double OpenSim::StepFunction::getEndTime (  )  const [inline]

Get step transition time.

double OpenSim::StepFunction::getEndValue (  )  const [inline]

Get end value before step.

double OpenSim::StepFunction::getStartTime (  )  const [inline]

Get step transition time.

double OpenSim::StepFunction::getStartValue (  )  const [inline]

Get start value before step.

OpenSim::StepFunction::OPENSIM_DECLARE_DERIVED ( StepFunction  ,
Function   
)
StepFunction & StepFunction::operator= ( const StepFunction aStepFunction  ) 

Assignment operator.

Note that data members of the base class are also assigned.

Parameters:
aStepFunction StepFunction to be copied.
Returns:
Reference to this object.

Reimplemented from OpenSim::Function.

void OpenSim::StepFunction::setEndTime ( double  time  )  [inline]

Set step transition end time.

void OpenSim::StepFunction::setEndValue ( double  end  )  [inline]

Set end value before step.

void OpenSim::StepFunction::setStartTime ( double  time  )  [inline]

Set step transition start time.

void OpenSim::StepFunction::setStartValue ( double  start  )  [inline]

Set start value before step.


Member Data Documentation

double& OpenSim::StepFunction::_endTime [protected]
double& OpenSim::StepFunction::_endValue [protected]
double& OpenSim::StepFunction::_startTime [protected]

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

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