Fast Research Interface Library  Manual and Documentation
include/TypeIRMLInputParameters.h
Go to the documentation of this file.
00001 //  ---------------------- Doxygen info ----------------------
00047 //  ----------------------------------------------------------
00048 //   For a convenient reading of this file's source code,
00049 //   please use a tab width of four characters.
00050 //  ----------------------------------------------------------
00051 
00052 
00053 
00054 #ifndef __TypeIRMLInputParameters__
00055 #define __TypeIRMLInputParameters__
00056 
00057 #include <TypeIRMLVector.h>
00058 
00059 namespace TypeIRMLMath
00060 {
00061 
00062 
00063 //  ---------------------- Doxygen info ----------------------
00075 //  ----------------------------------------------------------
00076 class TypeIRMLInputParameters
00077 {
00078 
00079 public:
00080 
00081 
00082 //  ---------------------- Doxygen info ----------------------
00097 //  ----------------------------------------------------------
00098 
00099     TypeIRMLInputParameters(const unsigned int &NumberOfDOFs)
00100     {
00101         this->CurrentPosition           =   new TypeIRMLDoubleVector(NumberOfDOFs);
00102         this->CurrentVelocity           =   new TypeIRMLDoubleVector(NumberOfDOFs);
00103         this->MaxVelocity               =   new TypeIRMLDoubleVector(NumberOfDOFs);
00104         this->MaxAcceleration           =   new TypeIRMLDoubleVector(NumberOfDOFs);
00105         this->TargetPosition            =   new TypeIRMLDoubleVector(NumberOfDOFs);
00106         this->TargetVelocity            =   new TypeIRMLDoubleVector(NumberOfDOFs);
00107         this->SelectionVector           =   new TypeIRMLBoolVector  (NumberOfDOFs);
00108 
00109         this->CurrentPosition->Set(0.0)     ;
00110         this->CurrentVelocity->Set(0.0)     ;
00111         this->MaxVelocity->Set(0.0)         ;       
00112         this->MaxAcceleration->Set(0.0)     ;
00113         this->TargetPosition->Set(0.0)      ;
00114         this->TargetVelocity->Set(0.0)      ;
00115         this->SelectionVector->Set(false)   ;
00116     }
00117 
00118 
00119 //  ---------------------- Doxygen info ----------------------
00133 //  ----------------------------------------------------------
00134     TypeIRMLInputParameters(const TypeIRMLInputParameters & IP)
00135     {
00136         this->CurrentPosition           =   new TypeIRMLDoubleVector(IP.CurrentPosition->VectorDimension    );
00137         this->CurrentVelocity           =   new TypeIRMLDoubleVector(IP.CurrentVelocity->VectorDimension    );
00138         this->MaxVelocity               =   new TypeIRMLDoubleVector(IP.MaxVelocity->VectorDimension        );
00139         this->MaxAcceleration           =   new TypeIRMLDoubleVector(IP.MaxAcceleration->VectorDimension    );
00140         this->TargetPosition            =   new TypeIRMLDoubleVector(IP.TargetPosition->VectorDimension     );
00141         this->TargetVelocity            =   new TypeIRMLDoubleVector(IP.TargetPosition->VectorDimension     );
00142         this->SelectionVector           =   new TypeIRMLBoolVector  (IP.SelectionVector->VectorDimension    );
00143 
00144         this->CurrentPosition   =   IP.CurrentPosition  ;
00145         this->CurrentVelocity   =   IP.CurrentVelocity  ;
00146         this->MaxVelocity       =   IP.MaxVelocity      ;   
00147         this->MaxAcceleration   =   IP.MaxAcceleration  ;
00148         this->TargetPosition    =   IP.TargetPosition   ;
00149         this->TargetVelocity    =   IP.TargetVelocity   ;
00150         this->SelectionVector   =   IP.SelectionVector  ;
00151 
00152     }
00153 
00154 //  ---------------------- Doxygen info ----------------------
00162 //  ----------------------------------------------------------
00163     TypeIRMLInputParameters &operator = (const TypeIRMLInputParameters &IP)
00164     {
00165         this->CurrentPosition   =   IP.CurrentPosition  ;
00166         this->CurrentVelocity   =   IP.CurrentVelocity  ;
00167         this->MaxVelocity       =   IP.MaxVelocity      ;   
00168         this->MaxAcceleration   =   IP.MaxAcceleration  ;
00169         this->TargetPosition    =   IP.TargetPosition   ;
00170         this->TargetVelocity    =   IP.TargetVelocity   ;
00171         this->SelectionVector   =   IP.SelectionVector  ;
00172 
00173         return (*this);
00174     }
00175 
00176 
00177 //  ---------------------- Doxygen info ----------------------
00182 //  ----------------------------------------------------------
00183     ~TypeIRMLInputParameters(void)
00184     {
00185         delete this->CurrentPosition    ;
00186         delete this->CurrentVelocity    ;
00187         delete this->MaxVelocity        ;   
00188         delete this->MaxAcceleration    ;
00189         delete this->TargetPosition     ;
00190         delete this->TargetVelocity     ;
00191         delete this->SelectionVector    ;
00192 
00193         this->CurrentPosition       =   NULL;
00194         this->CurrentVelocity       =   NULL;
00195         this->MaxVelocity           =   NULL;
00196         this->MaxAcceleration       =   NULL;
00197         this->TargetPosition        =   NULL;
00198         this->TargetVelocity        =   NULL;
00199         this->SelectionVector       =   NULL;
00200     }
00201 
00202     TypeIRMLDoubleVector*   CurrentPosition ;
00203     TypeIRMLDoubleVector*   CurrentVelocity ;
00204     TypeIRMLDoubleVector*   MaxAcceleration ;
00205     TypeIRMLDoubleVector*   MaxVelocity     ;
00206     TypeIRMLDoubleVector*   TargetPosition  ;
00207     TypeIRMLDoubleVector*   TargetVelocity  ;
00208     TypeIRMLBoolVector*     SelectionVector ;
00209 };
00210 
00211 }   // namespace
00212 
00213 #endif
This document was generated with Doxygen on Thu Apr 12 2012 11:18:54. User documentation of the Fast Research Interface Library for the KUKA Lightweight Robot IV by the Stanford Robotics Research Group. Copyright 2010–2012.