23 int roundedAngle =
static_cast<int>(_angle);
24 if (_angle > roundedAngle + 0.001) ++roundedAngle;
27 float stroke = ref.first;
28 float interval = ref.second;
32 return stroke - (roundedAngle - _angle) * interval;
36 int roundedAngle =
static_cast<int>(_angle);
37 if (_angle > roundedAngle + 0.001) ++roundedAngle;
40 float stroke = ref.first;
41 float interval = ref.second;
45 return stroke - (roundedAngle - _angle) * interval;
49 int roundedAngle =
static_cast<int>(_angle);
50 if (_angle > roundedAngle + 0.001) ++roundedAngle;
53 float stroke = ref.first;
56 float interval = ref.second;
58 return stroke - (roundedAngle - _angle) * interval;
62 int roundedAngle1 =
static_cast<int>(_angle1);
63 if (_angle1 > roundedAngle1 + 0.001) ++roundedAngle1;
65 int roundedAngle2 =
static_cast<int>(_angle2);
66 if (_angle2 > roundedAngle2 + 0.001) ++roundedAngle2;
72 float stroke1 = ref1.first, stroke2 = ref2.first;
73 float interval1 = ref1.second, interval2 = ref2.second;
75 stroke1 -= (roundedAngle1 - _angle1) * interval1;
78 stroke2 -= (roundedAngle2 - _angle2) * interval2;
80 return {stroke2 + stroke1, stroke2 - stroke1} ;
84 int roundedAngle1 =
static_cast<int>(_angle1);
85 if (_angle1 > roundedAngle1 + 0.001) ++roundedAngle1;
87 int roundedAngle2 =
static_cast<int>(_angle2);
88 if (_angle2 > roundedAngle2 + 0.001) ++roundedAngle2;
94 float stroke1 = ref1.first, stroke2 = ref2.first;
95 float interval1 = ref1.second, interval2 = ref2.second;
97 stroke1 -= (roundedAngle1 - _angle1) * interval1;
100 stroke2 -= (roundedAngle2 - _angle2) * interval2;
102 return {stroke2 + stroke1, stroke2 - stroke1} ;
106 int roundedAngle1 =
static_cast<int>(_angle1);
107 if (_angle1 > roundedAngle1 + 0.001) ++roundedAngle1;
109 int roundedAngle2 =
static_cast<int>(_angle2);
110 if (_angle2 > roundedAngle2 + 0.001) ++roundedAngle2;
116 float stroke1 = ref1.first, stroke2 = ref2.first;
117 float interval1 = ref1.second, interval2 = ref2.second;
119 stroke1 -= (roundedAngle1 - _angle1) * interval1;
120 stroke2 -= (roundedAngle2 - _angle2) * interval2;
124 return {stroke2 + stroke1, stroke2 - stroke1} ;
128 int roundedAngle =
static_cast<int>(_angle);
129 if (_angle > roundedAngle + 0.001) ++roundedAngle;
132 float stroke = ref.first;
133 float interval = ref.second;
135 return stroke - (roundedAngle - _angle) * interval;
float ElbowPitchTable(float _angle)
static const std::vector< std::pair< float, float > > WaistRollPitchTableMap2
static const std::vector< std::pair< float, float > > WaistRollPitchTableMap1
static const int ArrayNeckRollPitchTableOffset1
static const std::vector< std::pair< float, float > > ShoulderPitchTableMap
static const std::vector< std::pair< float, float > > NeckRollPitchTableMap1
static const std::vector< std::pair< float, float > > NeckRollPitchTableMap2
float ShoulderPitchTable(float _angle)
static const int ArrayShoulderPitchTableOffset
static const int ArrayNeckRollPitchTableOffset2
static const int ArrayWristRollPitchTableOffset2
static const int ArrayShoulderRollTableOffset
static const std::vector< std::pair< float, float > > WristRollPitchTableMap2
dualJoint WaistRollPitchTable(float _angle1, float _angle2)
static const int ArrayWristRollPitchTableOffset1
static const int ArrayLegTableOffset
static const int ArrayWaistRollPitchTableOffset2
float ShoulderRollTable(float _angle)
float LegTable(float _angle)
static const std::vector< std::pair< float, float > > ShoulderRollTableMap
static const int ArrayElbowPitchTableOffset
dualJoint NeckRollPitchTable(float _angle1, float _angle2)
static const std::vector< std::pair< float, float > > ElbowPitchTableMap
static const int ArrayWaistRollPitchTableOffset1
static const std::vector< std::pair< float, float > > WristRollPitchTableMap1
dualJoint WristRollPitchTable(float _angle1, float _angle2)
static const std::vector< std::pair< float, float > > LegTableMap