00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00037 #ifndef GRASP_PRESHAPE_H
00038 #define GRASP_PRESHAPE_H
00039
00040
00041
00042 #define PR_circle_Angle 60.0
00043 #define PR_circle_F1 0.0
00044 #define PR_circle_F2 0.0
00045 #define PR_circle_F3 0.0
00046
00047 #define PR_two_opp_one_Angle 0.0
00048 #define PR_two_opp_one_F1 0.0
00049 #define PR_two_opp_one_F2 0.0
00050 #define PR_two_opp_one_F3 0.0
00051
00052 #define PR_three_opp_palm_Angle 180.0
00053 #define PR_three_opp_palm_F1 0.0
00054 #define PR_three_opp_palm_F2 0.0
00055 #define PR_three_opp_palm_F3 0.0
00056
00057 #define PR_t_shape_Angle 90.0
00058 #define PR_t_shape_F1 0.0
00059 #define PR_t_shape_F2 0.0
00060 #define PR_t_shape_F3 0.0
00061
00068 enum preshapeType{PR_None, PR_circle, PR_two_opp_one, PR_three_opp_palm, PR_t_shape};
00069
00071
00076 class preshape
00077 {
00078 private:
00080 double a;
00081
00083 double f1;
00084
00086 double f2;
00087
00089 double f3;
00090
00092 preshapeType pType;
00093
00094 void updateAngles();
00095
00096 public:
00097
00098 preshape();
00099 preshape(preshapeType);
00100 preshape(const preshape&);
00101
00102 void set_preshapeType(preshapeType);
00103 void set_preshape(double, double, double, double);
00104
00105 preshapeType get_preshapeType() const;
00106 void get_preshape(double&, double&, double&, double&) const;
00107
00108 double distanceTo(preshape) const;
00109 };
00110
00111
00112 #endif
00113
00114
00115
00116
00117
00118
00119