Biomechanical Joint Model
 Author: Anderson Maciel

cometimer.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Anderson Maciel                                 *
00003  *   andi.maciel@gmail.com                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  **************************************************************************/
00020 
00031 
00032 #include <general/cometimer.h>
00033 
00035 // Construction/Destruction
00037 
00038 COME_Timer::COME_Timer(){
00039 
00040         startTime = 0.0;
00041         finishTime = 1.0;
00042         currentTime = 0.0;
00043         timeStep = 0.1;
00044 }
00045 
00046 COME_Timer::COME_Timer( double finishT, double timeS ){
00047 
00048         startTime = 0.0;
00049         finishTime = finishT;
00050         currentTime = 0.0;
00051         timeStep = timeS;
00052 }
00053 
00054 COME_Timer::COME_Timer( double startT, double finishT, double timeS, double currentT ){
00055 
00056         startTime = startT;
00057         finishTime = finishT;
00058         currentTime = currentT;
00059         timeStep = timeS;
00060 }
00061 
00062 COME_Timer::~COME_Timer(){
00063 
00064 }
00065 
00066 void
00067 COME_Timer::goStep(){
00068 
00069         currentTime += timeStep;
00070 }
00071 
00072 void
00073 COME_Timer::stepBack(){
00074 
00075         currentTime -= timeStep;
00076 }
00077 
00078 void
00079 COME_Timer::reset(){
00080 
00081         currentTime = 0.0;
00082 }
00083 
00084 double
00085 COME_Timer::getStart(){
00086 
00087         return startTime;
00088 }
00089 
00090 double
00091 COME_Timer::getFinish(){
00092 
00093         return finishTime;
00094 }
00095 
00096 double
00097 COME_Timer::getCurrent(){
00098 
00099         return currentTime;
00100 }
00101 
00102 double
00103 COME_Timer::getStep(){
00104 
00105         return timeStep;
00106 }
00107 
00108 void
00109 COME_Timer::setStart( double start ){
00110 
00111         startTime = start;
00112 }
00113 
00114 void
00115 COME_Timer::setFinish( double finish ){
00116 
00117         finishTime = finish;
00118 }
00119 
00120 void
00121 COME_Timer::setCurrent( double current ){
00122 
00123         currentTime = current;
00124 }
00125 
00126 void
00127 COME_Timer::setStep( double step ){
00128 
00129         timeStep = step;
00130 }

Generated on Thu Dec 1 10:13:36 2005 for COME - Biomechanical Joint Model by  doxygen 1.4.5