Reflexxes Motion Libraries  Manual and Documentation (Type II, Version 1.2.6)
include/RMLInputParameters.h
Go to the documentation of this file.
00001 //  ---------------------- Doxygen info ----------------------
00043 //  ----------------------------------------------------------
00044 //   For a convenient reading of this file's source code,
00045 //   please use a tab width of four characters.
00046 //  ----------------------------------------------------------
00047
00048
00049 #ifndef __RMLInputParameters__
00050 #define __RMLInputParameters__
00051 
00052
00053 #include <RMLVector.h>
00054 #include <string.h>
00055 #include <stdio.h>
00056
00057
00058 //  ---------------------- Doxygen info ----------------------
00077 //  ----------------------------------------------------------
00078 class RMLInputParameters
00079 {
00080
00081 protected:
00082
00083 //  ---------------------- Doxygen info ----------------------
00103 //  ----------------------------------------------------------
00104     RMLInputParameters(const unsigned int DegreesOfFreedom)
00105     {
00106         this->NumberOfDOFs                  =   DegreesOfFreedom                        ;
00107         this->MinimumSynchronizationTime    =   0.0                                     ;
00108         this->SelectionVector               =   new RMLBoolVector   (DegreesOfFreedom)  ;
00109         this->CurrentPositionVector         =   new RMLDoubleVector (DegreesOfFreedom)  ;
00110         this->CurrentVelocityVector         =   new RMLDoubleVector (DegreesOfFreedom)  ;
00111         this->CurrentAccelerationVector     =   new RMLDoubleVector (DegreesOfFreedom)  ;
00112         this->MaxAccelerationVector         =   new RMLDoubleVector (DegreesOfFreedom)  ;
00113         this->MaxJerkVector                 =   new RMLDoubleVector (DegreesOfFreedom)  ;
00114         this->TargetVelocityVector          =   new RMLDoubleVector (DegreesOfFreedom)  ;
00115
00116         memset(this->SelectionVector->VecData               ,   0x0 ,       DegreesOfFreedom * sizeof(bool))    ;
00117         memset(this->CurrentPositionVector->VecData         ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00118         memset(this->CurrentVelocityVector->VecData         ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00119         memset(this->CurrentAccelerationVector->VecData     ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00120         memset(this->MaxAccelerationVector->VecData         ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00121         memset(this->MaxJerkVector->VecData                 ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00122         memset(this->TargetVelocityVector->VecData          ,   0x0 ,       DegreesOfFreedom * sizeof(double))  ;
00123     }
00124
00125 public:
00126
00127 //  ---------------------- Doxygen info ----------------------
00139 //  ----------------------------------------------------------
00140     RMLInputParameters(const RMLInputParameters &IP)
00141     {
00142         this->NumberOfDOFs              =   IP.GetNumberOfDOFs()                                            ;
00143         this->SelectionVector           =   new RMLBoolVector   ((IP.CurrentPositionVector)->GetVecDim())   ;
00144         this->CurrentPositionVector     =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00145         this->CurrentVelocityVector     =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00146         this->CurrentAccelerationVector =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00147         this->MaxAccelerationVector     =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00148         this->MaxJerkVector             =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00149         this->TargetVelocityVector      =   new RMLDoubleVector ((IP.CurrentPositionVector)->GetVecDim())   ;
00150
00151         *this                           =   IP                                                              ;
00152     }
00153
00154
00155 //  ---------------------- Doxygen info ----------------------
00160 //  ----------------------------------------------------------
00161     ~RMLInputParameters(void)
00162     {
00163         delete  this->SelectionVector               ;
00164         delete  this->CurrentPositionVector         ;
00165         delete  this->CurrentVelocityVector         ;
00166         delete  this->CurrentAccelerationVector     ;
00167         delete  this->MaxAccelerationVector         ;
00168         delete  this->MaxJerkVector                 ;
00169         delete  this->TargetVelocityVector          ;
00170
00171         this->SelectionVector           =   NULL    ;
00172         this->CurrentPositionVector     =   NULL    ;
00173         this->CurrentVelocityVector     =   NULL    ;
00174         this->CurrentAccelerationVector =   NULL    ;
00175         this->MaxAccelerationVector     =   NULL    ;
00176         this->MaxJerkVector             =   NULL    ;
00177         this->TargetVelocityVector      =   NULL    ;
00178         this->NumberOfDOFs              =   0       ;
00179     }
00180
00181
00182 //  ---------------------- Doxygen info ----------------------
00190 //  ----------------------------------------------------------
00191     RMLInputParameters &operator = (const RMLInputParameters &IP)
00192     {
00193         this->NumberOfDOFs                      =   IP.NumberOfDOFs                 ;
00194         this->MinimumSynchronizationTime        =   IP.MinimumSynchronizationTime   ;
00195         *(this->SelectionVector             )   =   *(IP.SelectionVector            );
00196         *(this->CurrentPositionVector       )   =   *(IP.CurrentPositionVector      );
00197         *(this->CurrentVelocityVector       )   =   *(IP.CurrentVelocityVector      );
00198         *(this->CurrentAccelerationVector   )   =   *(IP.CurrentAccelerationVector  );
00199         *(this->MaxAccelerationVector       )   =   *(IP.MaxAccelerationVector      );
00200         *(this->MaxJerkVector               )   =   *(IP.MaxJerkVector              );
00201         *(this->TargetVelocityVector        )   =   *(IP.TargetVelocityVector       );
00202
00203         return(*this);
00204     }
00205
00206
00207 // #############################################################################
00208
00209
00210 //  ---------------------- Doxygen info ----------------------
00224 //  ----------------------------------------------------------
00225     inline void SetSelectionVector(const RMLBoolVector &InputVector)
00226     {
00227         *(this->SelectionVector) = InputVector;
00228     }
00229
00230
00231 //  ---------------------- Doxygen info ----------------------
00245 //  ----------------------------------------------------------
00246     inline void SetSelectionVector(const bool *InputVector)
00247     {
00248         memcpy(     (void*)this->SelectionVector->VecData
00249                 ,   (void*)InputVector
00250                 ,   (this->SelectionVector->GetVecDim() * sizeof(bool)) );
00251     }
00252
00253
00254 //  ---------------------- Doxygen info ----------------------
00270 //  ----------------------------------------------------------
00271     inline void SetSelectionVectorElement(      const bool          &InputValue
00272                                             ,   const unsigned int  &Index)
00273     {
00274         (*this->SelectionVector)[Index] =   InputValue;
00275     }
00276
00277
00278 //  ---------------------- Doxygen info ----------------------
00293 //  ----------------------------------------------------------
00294     inline void GetSelectionVector(RMLBoolVector *InputVector) const
00295     {
00296         *InputVector    =   *(this->SelectionVector);
00297     }
00298
00299
00300 //  ---------------------- Doxygen info ----------------------
00323 //  ----------------------------------------------------------
00324     inline void GetSelectionVector(     bool                    *InputVector
00325                                     ,   const unsigned int      &SizeInBytes) const
00326     {
00327         memcpy(     (void*)InputVector
00328                 ,   (void*)this->SelectionVector->VecData
00329                 ,   SizeInBytes );
00330     }
00331
00332
00333 //  ---------------------- Doxygen info ----------------------
00354 //  ----------------------------------------------------------
00355     inline void GetSelectionVectorElement(      bool                *InputValue
00356                                             ,   const unsigned int  &Index) const
00357     {
00358         if ( ( Index + 1 ) > ((unsigned int) this->SelectionVector->GetVecDim() ) )
00359         {
00360             *InputValue =   0.0;
00361         }
00362         else
00363         {
00364             *InputValue =   (*this->SelectionVector)[Index];
00365         }
00366     }
00367
00368
00369 //  ---------------------- Doxygen info ----------------------
00384 //  ----------------------------------------------------------
00385     inline bool GetSelectionVectorElement(const unsigned int &Index) const
00386     {
00387         if ( ( Index + 1 ) > ((unsigned int) this->SelectionVector->GetVecDim() ) )
00388         {
00389             return(0.0);
00390         }
00391         else
00392         {
00393             return( (*this->SelectionVector)[Index] );
00394         }
00395     }
00396
00397
00398 // #############################################################################
00399
00400
00401 //  ---------------------- Doxygen info ----------------------
00415 //  ----------------------------------------------------------
00416     inline void SetCurrentPositionVector(const RMLDoubleVector &InputVector)
00417     {
00418         *(this->CurrentPositionVector) = InputVector;
00419     }
00420
00421
00422 //  ---------------------- Doxygen info ----------------------
00436 //  ----------------------------------------------------------
00437     inline void SetCurrentPositionVector(const double *InputVector)
00438     {
00439         memcpy(     (void*)this->CurrentPositionVector->VecData
00440                 ,   (void*)InputVector
00441                 ,   (this->CurrentPositionVector->GetVecDim() * sizeof(double)) );
00442     }
00443
00444
00445 //  ---------------------- Doxygen info ----------------------
00461 //  ----------------------------------------------------------
00462     inline void SetCurrentPositionVectorElement(        const double        &InputValue
00463                                                     ,   const unsigned int  &Index)
00464     {
00465         (*this->CurrentPositionVector)[Index]   =   InputValue;
00466     }
00467
00468
00469 //  ---------------------- Doxygen info ----------------------
00484 //  ----------------------------------------------------------
00485     inline void GetCurrentPositionVector(RMLDoubleVector *InputVector) const
00486     {
00487         *InputVector    =   *(this->CurrentPositionVector);
00488     }
00489
00490
00491 //  ---------------------- Doxygen info ----------------------
00514 //  ----------------------------------------------------------
00515     inline void GetCurrentPositionVector(       double              *InputVector
00516                                             ,   const unsigned int  &SizeInBytes) const
00517     {
00518         memcpy(     (void*)InputVector
00519                 ,   (void*)this->CurrentPositionVector->VecData
00520                 ,   SizeInBytes );
00521     }
00522
00523
00524 //  ---------------------- Doxygen info ----------------------
00545 //  ----------------------------------------------------------
00546     inline void GetCurrentPositionVectorElement(    double              *InputValue
00547                                                 ,   const unsigned int  &Index) const
00548     {
00549         if ( ( Index + 1 ) > ((unsigned int) this->CurrentPositionVector->GetVecDim() ) )
00550         {
00551             *InputValue =   0.0;
00552         }
00553         else
00554         {
00555             *InputValue =   (*this->CurrentPositionVector)[Index];
00556         }
00557     }
00558
00559
00560 //  ---------------------- Doxygen info ----------------------
00575 //  ----------------------------------------------------------
00576     inline double GetCurrentPositionVectorElement(const unsigned int &Index) const
00577     {
00578         if ( ( Index + 1 ) > ((unsigned int) this->CurrentPositionVector->GetVecDim() ) )
00579         {
00580             return(0.0);
00581         }
00582         else
00583         {
00584             return( (*this->CurrentPositionVector)[Index] );
00585         }
00586     }
00587
00588
00589 // #############################################################################
00590
00591
00592 //  ---------------------- Doxygen info ----------------------
00606 //  ----------------------------------------------------------
00607     inline void SetCurrentVelocityVector(const RMLDoubleVector &InputVector)
00608     {
00609         *(this->CurrentVelocityVector) = InputVector;
00610     }
00611
00612
00613 //  ---------------------- Doxygen info ----------------------
00627 //  ----------------------------------------------------------
00628     inline void SetCurrentVelocityVector(const double *InputVector)
00629     {
00630         memcpy(     (void*)this->CurrentVelocityVector->VecData
00631                 ,   (void*)InputVector
00632                 ,   (this->CurrentVelocityVector->GetVecDim() * sizeof(double)) );
00633     }
00634
00635
00636 //  ---------------------- Doxygen info ----------------------
00652 //  ----------------------------------------------------------
00653     inline void SetCurrentVelocityVectorElement(    const double        &InputValue
00654                                                 ,   const unsigned int  &Index)
00655     {
00656         (*this->CurrentVelocityVector)[Index]   =   InputValue;
00657     }
00658
00659
00660 //  ---------------------- Doxygen info ----------------------
00675 //  ----------------------------------------------------------
00676     inline void GetCurrentVelocityVector(RMLDoubleVector *InputVector) const
00677     {
00678         *InputVector    =   *(this->CurrentVelocityVector);
00679     }
00680
00681
00682 //  ---------------------- Doxygen info ----------------------
00705 //  ----------------------------------------------------------
00706     inline void GetCurrentVelocityVector(       double              *InputVector
00707                                             ,   const unsigned int  &SizeInBytes) const
00708     {
00709         memcpy(     (void*)InputVector
00710                 ,   (void*)this->CurrentVelocityVector->VecData
00711                 ,   SizeInBytes );
00712     }
00713
00714
00715 //  ---------------------- Doxygen info ----------------------
00736 //  ----------------------------------------------------------
00737     inline void GetCurrentVelocityVectorElement(    double              *InputValue
00738                                                 ,   const unsigned int  &Index) const
00739     {
00740         if ( ( Index + 1 ) > ((unsigned int) this->CurrentVelocityVector->GetVecDim() ) )
00741         {
00742             *InputValue =   0.0;
00743         }
00744         else
00745         {
00746             *InputValue =   (*this->CurrentVelocityVector)[Index];
00747         }
00748     }
00749
00750
00751 //  ---------------------- Doxygen info ----------------------
00766 //  ----------------------------------------------------------
00767     inline double GetCurrentVelocityVectorElement(const unsigned int &Index) const
00768     {
00769         if ( ( Index + 1 ) > ((unsigned int) this->CurrentVelocityVector->GetVecDim() ) )
00770         {
00771             return(0.0);
00772         }
00773         else
00774         {
00775             return( (*this->CurrentVelocityVector)[Index] );
00776         }
00777     }
00778
00779
00780 // #############################################################################
00781
00782
00783 //  ---------------------- Doxygen info ----------------------
00797 //  ----------------------------------------------------------
00798     inline void SetCurrentAccelerationVector(const RMLDoubleVector &InputVector)
00799     {
00800         *(this->CurrentAccelerationVector) = InputVector;
00801     }
00802
00803
00804 //  ---------------------- Doxygen info ----------------------
00818 //  ----------------------------------------------------------
00819     inline void SetCurrentAccelerationVector(const double *InputVector)
00820     {
00821         memcpy(     (void*)this->CurrentAccelerationVector->VecData
00822                 ,   (void*)InputVector
00823                 ,   (this->CurrentAccelerationVector->GetVecDim() * sizeof(double)) );
00824     }
00825
00826
00827 //  ---------------------- Doxygen info ----------------------
00843 //  ----------------------------------------------------------
00844     inline void SetCurrentAccelerationVectorElement(    const double        &InputValue
00845                                                     ,   const unsigned int  &Index)
00846     {
00847         (*this->CurrentAccelerationVector)[Index]   =   InputValue;
00848     }
00849
00850
00851 //  ---------------------- Doxygen info ----------------------
00866 //  ----------------------------------------------------------
00867     inline void GetCurrentAccelerationVector(RMLDoubleVector *InputVector) const
00868     {
00869         *InputVector    =   *(this->CurrentAccelerationVector);
00870     }
00871
00872
00873
00874 //  ---------------------- Doxygen info ----------------------
00897 //  ----------------------------------------------------------
00898     inline void GetCurrentAccelerationVector(       double              *InputVector
00899                                                 ,   const unsigned int  &SizeInBytes) const
00900     {
00901         memcpy(     (void*)InputVector
00902                 ,   (void*)this->CurrentAccelerationVector->VecData
00903                 ,   SizeInBytes );
00904     }
00905
00906
00907 //  ---------------------- Doxygen info ----------------------
00928 //  ----------------------------------------------------------
00929     inline void GetCurrentAccelerationVectorElement(    double              *InputValue
00930                                                     ,   const unsigned int  &Index) const
00931     {
00932         if ( ( Index + 1 ) > ((unsigned int) this->CurrentAccelerationVector->GetVecDim() ) )
00933         {
00934             *InputValue =   0.0;
00935         }
00936         else
00937         {
00938             *InputValue =   (*this->CurrentAccelerationVector)[Index];
00939         }
00940     }
00941
00942
00943 //  ---------------------- Doxygen info ----------------------
00958 //  ----------------------------------------------------------
00959     inline double GetCurrentAccelerationVectorElement(const unsigned int &Index) const
00960     {
00961         if ( ( Index + 1 ) > ((unsigned int) this->CurrentAccelerationVector->GetVecDim() ) )
00962         {
00963             return(0.0);
00964         }
00965         else
00966         {
00967             return( (*this->CurrentAccelerationVector)[Index] );
00968         }
00969     }
00970
00971
00972 // #############################################################################
00973
00974
00975 //  ---------------------- Doxygen info ----------------------
00989 //  ----------------------------------------------------------
00990     inline void SetMaxAccelerationVector(const RMLDoubleVector &InputVector)
00991     {
00992         *(this->MaxAccelerationVector) = InputVector;
00993     }
00994
00995
00996 //  ---------------------- Doxygen info ----------------------
01010 //  ----------------------------------------------------------
01011     inline void SetMaxAccelerationVector(const double *InputVector)
01012     {
01013         memcpy(     (void*)this->MaxAccelerationVector->VecData
01014                 ,   (void*)InputVector
01015                 ,   (this->MaxAccelerationVector->GetVecDim() * sizeof(double)) );
01016     }
01017
01018
01019 //  ---------------------- Doxygen info ----------------------
01035 //  ----------------------------------------------------------
01036     inline void SetMaxAccelerationVectorElement(    const double        &InputValue
01037                                                 ,   const unsigned int  &Index)
01038     {
01039         (*this->MaxAccelerationVector)[Index]   =   InputValue;
01040     }
01041
01042
01043 //  ---------------------- Doxygen info ----------------------
01058 //  ----------------------------------------------------------
01059     inline void GetMaxAccelerationVector(RMLDoubleVector *InputVector) const
01060     {
01061         *InputVector    =   *(this->MaxAccelerationVector);
01062     }
01063
01064
01065 //  ---------------------- Doxygen info ----------------------
01088 //  ----------------------------------------------------------
01089     inline void GetMaxAccelerationVector(       double              *InputVector
01090                                             ,   const unsigned int  &SizeInBytes) const
01091     {
01092         memcpy(     (void*)InputVector
01093                 ,   (void*)this->MaxAccelerationVector->VecData
01094                 ,   SizeInBytes );
01095     }
01096
01097
01098 //  ---------------------- Doxygen info ----------------------
01119 //  ----------------------------------------------------------
01120     inline void GetMaxAccelerationVectorElement(    double              *InputValue
01121                                                 ,   const unsigned int  &Index) const
01122     {
01123         if ( ( Index + 1 ) > ((unsigned int) this->MaxAccelerationVector->GetVecDim() ) )
01124         {
01125             *InputValue =   0.0;
01126         }
01127         else
01128         {
01129             *InputValue =   (*this->MaxAccelerationVector)[Index];
01130         }
01131     }
01132
01133
01134 //  ---------------------- Doxygen info ----------------------
01149 //  ----------------------------------------------------------
01150     inline double GetMaxAccelerationVectorElement(const unsigned int &Index) const
01151     {
01152         if ( ( Index + 1 ) > ((unsigned int) this->MaxAccelerationVector->GetVecDim() ) )
01153         {
01154             return(0.0);
01155         }
01156         else
01157         {
01158             return( (*this->MaxAccelerationVector)[Index] );
01159         }
01160     }
01161
01162
01163 // #############################################################################
01164
01165
01166 //  ---------------------- Doxygen info ----------------------
01180 //  ----------------------------------------------------------
01181     inline void SetMaxJerkVector(const RMLDoubleVector &InputVector)
01182     {
01183         *(this->MaxJerkVector) = InputVector;
01184     }
01185
01186
01187 //  ---------------------- Doxygen info ----------------------
01201 //  ----------------------------------------------------------
01202     inline void SetMaxJerkVector(const double *InputVector)
01203     {
01204         memcpy(     (void*)this->MaxJerkVector->VecData
01205                 ,   (void*)InputVector
01206                 ,   (this->MaxJerkVector->GetVecDim() * sizeof(double)) );
01207     }
01208
01209
01210 //  ---------------------- Doxygen info ----------------------
01226 //  ----------------------------------------------------------
01227     inline void SetMaxJerkVectorElement(    const double        &InputValue
01228                                         ,   const unsigned int  &Index)
01229     {
01230         (*this->MaxJerkVector)[Index]   =   InputValue;
01231     }
01232
01233
01234 //  ---------------------- Doxygen info ----------------------
01249 //  ----------------------------------------------------------
01250     inline void GetMaxJerkVector(RMLDoubleVector *InputVector) const
01251     {
01252         *InputVector    =   *(this->MaxJerkVector);
01253     }
01254
01255
01256 //  ---------------------- Doxygen info ----------------------
01279 //  ----------------------------------------------------------
01280     inline void GetMaxJerkVector(       double              *InputVector
01281                                     ,   const unsigned int  &SizeInBytes) const
01282     {
01283         memcpy(     (void*)InputVector
01284                 ,   (void*)this->MaxJerkVector->VecData
01285                 ,   SizeInBytes );
01286     }
01287
01288
01289 //  ---------------------- Doxygen info ----------------------
01310 //  ----------------------------------------------------------
01311     inline void GetMaxJerkVectorElement(    double              *InputValue
01312                                         ,   const unsigned int  &Index) const
01313     {
01314         if ( ( Index + 1 ) > ((unsigned int) this->MaxJerkVector->GetVecDim() ) )
01315         {
01316             *InputValue =   0.0;
01317         }
01318         else
01319         {
01320             *InputValue =   (*this->MaxJerkVector)[Index];
01321         }
01322     }
01323
01324
01325 //  ---------------------- Doxygen info ----------------------
01340 //  ----------------------------------------------------------
01341     inline double GetMaxJerkVectorElement(const unsigned int &Index) const
01342     {
01343         if ( ( Index + 1 ) > ((unsigned int) this->MaxJerkVector->GetVecDim() ) )
01344         {
01345             return(0.0);
01346         }
01347         else
01348         {
01349             return( (*this->MaxJerkVector)[Index] );
01350         }
01351     }
01352
01353
01354 // #############################################################################
01355
01356
01357 //  ---------------------- Doxygen info ----------------------
01371 //  ----------------------------------------------------------
01372     inline void SetTargetVelocityVector(const RMLDoubleVector &InputVector)
01373     {
01374         *(this->TargetVelocityVector) = InputVector;
01375     }
01376
01377
01378 //  ---------------------- Doxygen info ----------------------
01392 //  ----------------------------------------------------------
01393     inline void SetTargetVelocityVector(const double *InputVector)
01394     {
01395         memcpy(     (void*)this->TargetVelocityVector->VecData
01396                 ,   (void*)InputVector
01397                 ,   (this->TargetVelocityVector->GetVecDim() * sizeof(double))  );
01398     }
01399
01400
01401 //  ---------------------- Doxygen info ----------------------
01417 //  ----------------------------------------------------------
01418     inline void SetTargetVelocityVectorElement(     const double        &InputValue
01419                                                 ,   const unsigned int  &Index)
01420     {
01421         (*this->TargetVelocityVector)[Index]    =   InputValue;
01422     }
01423
01424
01425 //  ---------------------- Doxygen info ----------------------
01440 //  ----------------------------------------------------------
01441     inline void GetTargetVelocityVector(RMLDoubleVector *InputVector) const
01442     {
01443         *InputVector    =   *(this->TargetVelocityVector);
01444     }
01445
01446
01447 //  ---------------------- Doxygen info ----------------------
01470 //  ----------------------------------------------------------
01471     inline void GetTargetVelocityVector(    double              *InputVector
01472                                         ,   const unsigned int  &SizeInBytes) const
01473     {
01474         memcpy(     (void*)InputVector
01475                 ,   (void*)this->TargetVelocityVector->VecData
01476                 ,   SizeInBytes );
01477     }
01478
01479
01480 //  ---------------------- Doxygen info ----------------------
01501 //  ----------------------------------------------------------
01502     inline void GetTargetVelocityVectorElement(     double              *InputValue
01503                                                 ,   const unsigned int  &Index) const
01504     {
01505         if ( ( Index + 1 ) > ((unsigned int) this->TargetVelocityVector->GetVecDim() ) )
01506         {
01507             *InputValue =   0.0;
01508         }
01509         else
01510         {
01511             *InputValue =   (*this->TargetVelocityVector)[Index];
01512         }
01513     }
01514
01515
01516 //  ---------------------- Doxygen info ----------------------
01531 //  ----------------------------------------------------------
01532     inline double GetTargetVelocityVectorElement(const unsigned int &Index) const
01533     {
01534         if ( ( Index + 1 ) > ((unsigned int) this->TargetVelocityVector->GetVecDim() ) )
01535         {
01536             return(0.0);
01537         }
01538         else
01539         {
01540             return( (*this->TargetVelocityVector)[Index] );
01541         }
01542     }
01543
01544
01545 //  ---------------------- Doxygen info ----------------------
01553 //  ----------------------------------------------------------
01554     inline unsigned int GetNumberOfDOFs(void) const
01555     {
01556         return(this->NumberOfDOFs);
01557     }
01558
01559
01560 //  ---------------------- Doxygen info ----------------------
01570 //  ----------------------------------------------------------
01571     inline double GetMinimumSynchronizationTime(void) const
01572     {
01573         return(this->MinimumSynchronizationTime);
01574     }
01575
01576
01577 //  ---------------------- Doxygen info ----------------------
01584 //  ----------------------------------------------------------
01585     inline void SetMinimumSynchronizationTime(double Time)
01586     {
01587         this->MinimumSynchronizationTime    =   Time;
01588         return;
01589     }
01590
01591
01592 protected:
01593
01594
01595 //  ---------------------- Doxygen info ----------------------
01606 //  ----------------------------------------------------------
01607     void Echo(FILE* FileHandler = stdout) const
01608     {
01609         unsigned int        i   =   0;
01610
01611         if (FileHandler == NULL)
01612         {
01613             return;
01614         }
01615
01616         fprintf(FileHandler,   "Selection vector           : ");
01617         for (i = 0; i < this->NumberOfDOFs; i++)
01618         {
01619             fprintf(FileHandler, " %s ", (this->SelectionVector->VecData[i])?("true"):("false"));
01620         }
01621         fprintf(FileHandler, "\nCurrent position vector    : ");
01622         for (i = 0; i < this->NumberOfDOFs; i++)
01623         {
01624             fprintf(FileHandler, " %.20le ", this->CurrentPositionVector->VecData[i]);
01625         }
01626         fprintf(FileHandler, "\nCurrent velocity vector    : ");
01627         for (i = 0; i < this->NumberOfDOFs; i++)
01628         {
01629             fprintf(FileHandler, " %.20le ", this->CurrentVelocityVector->VecData[i]);
01630         }
01631         fprintf(FileHandler, "\nCurrent acceleration vector: ");
01632         for (i = 0; i < this->NumberOfDOFs; i++)
01633         {
01634             fprintf(FileHandler, " %.20le ", this->CurrentAccelerationVector->VecData[i]);
01635         }
01636         fprintf(FileHandler, "\nTarget velocity vector     : ");
01637         for (i = 0; i < this->NumberOfDOFs; i++)
01638         {
01639             fprintf(FileHandler, " %.20le ", this->TargetVelocityVector->VecData[i]);
01640         }
01641         fprintf(FileHandler, "\nMax. acceleration vector   : ");
01642         for (i = 0; i < this->NumberOfDOFs; i++)
01643         {
01644             fprintf(FileHandler, " %.20le ", this->MaxAccelerationVector->VecData[i]);
01645         }
01646         fprintf(FileHandler, "\nMax. jerk vector           : ");
01647         for (i = 0; i < this->NumberOfDOFs; i++)
01648         {
01649             fprintf(FileHandler, " %.20le ", this->MaxJerkVector->VecData[i]);
01650         }
01651         fprintf(FileHandler, "\n");
01652         return;
01653     }
01654
01655 public:
01656
01657 //  ---------------------- Doxygen info ----------------------
01664 //  ----------------------------------------------------------
01665     unsigned int            NumberOfDOFs;
01666
01667
01668 //  ---------------------- Doxygen info ----------------------
01713 //  ----------------------------------------------------------
01714     double                  MinimumSynchronizationTime;
01715
01716
01717 //  ---------------------- Doxygen info ----------------------
01732 //  ----------------------------------------------------------
01733     RMLBoolVector           *SelectionVector;
01734
01735
01736 //  ---------------------- Doxygen info ----------------------
01751 //  ----------------------------------------------------------
01752     RMLDoubleVector         *CurrentPositionVector;
01753
01754
01755 //  ---------------------- Doxygen info ----------------------
01770 //  ----------------------------------------------------------
01771     RMLDoubleVector         *CurrentVelocityVector;
01772
01773
01774 //  ---------------------- Doxygen info ----------------------
01789 //  ----------------------------------------------------------
01790     RMLDoubleVector         *CurrentAccelerationVector;
01791
01792
01793 //  ---------------------- Doxygen info ----------------------
01808 //  ----------------------------------------------------------
01809     RMLDoubleVector         *MaxAccelerationVector;
01810
01811
01812 //  ---------------------- Doxygen info ----------------------
01827 //  ----------------------------------------------------------
01828     RMLDoubleVector         *MaxJerkVector;
01829
01830
01831 //  ---------------------- Doxygen info ----------------------
01846 //  ----------------------------------------------------------
01847     RMLDoubleVector         *TargetVelocityVector;
01848
01849
01850 };// class RMLInputParameters
01851
01852
01853
01854 #endif
User documentation of the Reflexxes Motion Libraries by Reflexxes GmbH (Company Information, Impressum). This document was generated with Doxygen on Mon Jul 7 2014 13:21:08. Copyright 2010–2014.