23 int roundedStroke =
static_cast<int>(_stroke);
26 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
28 std::vector<S2AData> candidates = ref.first;
29 std::vector<S2AData> appendix = ref.second;
32 if (candidates.size() >= 2)
33 if (candidates[0].stroke < candidates[1].stroke)
34 std::reverse(candidates.begin(), candidates.end());
36 for (
unsigned int i = 0; i < candidates.size(); ++i)
37 if (_stroke >= candidates[i].stroke)
38 if (candidates[i].range == 0)
39 return candidates[i].angle;
41 return candidates[i].angle
42 - (candidates[i].stroke - _stroke) / candidates[i].range;
44 if (appendix.size() >= 2)
45 if (appendix[0].stroke < appendix[1].stroke)
46 std::reverse(appendix.begin(), appendix.end());
48 if (appendix.size() == 0) {
49 return candidates[candidates.size() - 1].angle;
51 if (appendix[0].range == 0)
52 return appendix[0].angle;
54 return appendix[0].angle
55 - (appendix[0].stroke - _stroke) / appendix[0].range;
60 if (candidates.size() >= 2)
61 if (candidates[0].stroke > candidates[1].stroke)
62 std::reverse(candidates.begin(), candidates.end());
64 for (
unsigned int i = 0; i < candidates.size(); ++i)
65 if (_stroke <= candidates[i].stroke)
66 if (candidates[i].range == 0)
67 return candidates[i].angle;
69 return candidates[i].angle
70 - (candidates[i].stroke - _stroke) / candidates[i].range;
72 if (appendix.size() >= 2)
73 if (appendix[0].stroke > appendix[1].stroke)
74 std::reverse(appendix.begin(), appendix.end());
76 if (appendix.size() == 0) {
77 return candidates[candidates.size() - 1].angle;
79 if (appendix[0].range == 0)
80 return appendix[0].angle;
82 return appendix[0].angle
83 - (appendix[0].stroke - _stroke) / appendix[0].range;
91 int roundedStroke =
static_cast<int>(_stroke);
94 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
96 std::vector<S2AData> candidates = ref.first;
97 std::vector<S2AData> appendix = ref.second;
100 if (candidates.size() >= 2)
101 if (candidates[0].stroke < candidates[1].stroke)
102 std::reverse(candidates.begin(), candidates.end());
104 for (
unsigned int i = 0; i < candidates.size(); ++i)
105 if (_stroke >= candidates[i].stroke)
106 if (candidates[i].range == 0)
107 return candidates[i].angle;
109 return candidates[i].angle
110 - (candidates[i].stroke - _stroke) / candidates[i].range;
112 if (appendix.size() >= 2)
113 if (appendix[0].stroke < appendix[1].stroke)
114 std::reverse(appendix.begin(), appendix.end());
116 if (appendix.size() == 0) {
117 return candidates[candidates.size() - 1].angle;
119 if (appendix[0].range == 0)
120 return appendix[0].angle;
122 return appendix[0].angle
123 - (appendix[0].stroke - _stroke) / appendix[0].range;
128 if (candidates.size() >= 2)
129 if (candidates[0].stroke > candidates[1].stroke)
130 std::reverse(candidates.begin(), candidates.end());
132 for (
unsigned int i = 0; i < candidates.size(); ++i)
133 if (_stroke <= candidates[i].stroke)
134 if (candidates[i].range == 0)
135 return candidates[i].angle;
137 return candidates[i].angle
138 - (candidates[i].stroke - _stroke) / candidates[i].range;
140 if (appendix.size() >= 2)
141 if (appendix[0].stroke > appendix[1].stroke)
142 std::reverse(appendix.begin(), appendix.end());
144 if (appendix.size() == 0) {
145 return candidates[candidates.size() - 1].angle;
147 if (appendix[0].range == 0)
148 return appendix[0].angle;
150 return appendix[0].angle
151 - (appendix[0].stroke - _stroke) / appendix[0].range;
159 int roundedStroke =
static_cast<int>(_stroke);
162 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
164 std::vector<S2AData> candidates = ref.first;
165 std::vector<S2AData> appendix = ref.second;
168 if (candidates.size() >= 2)
169 if (candidates[0].stroke < candidates[1].stroke)
170 std::reverse(candidates.begin(), candidates.end());
172 for (
unsigned int i = 0; i < candidates.size(); ++i)
173 if (_stroke >= candidates[i].stroke)
174 if (candidates[i].range == 0)
175 return candidates[i].angle;
177 return candidates[i].angle
178 - (candidates[i].stroke - _stroke) / candidates[i].range;
180 if (appendix.size() >= 2)
181 if (appendix[0].stroke < appendix[1].stroke)
182 std::reverse(appendix.begin(), appendix.end());
184 if (appendix.size() == 0) {
185 return candidates[candidates.size() - 1].angle;
187 if (appendix[0].range == 0)
188 return appendix[0].angle;
190 return appendix[0].angle
191 - (appendix[0].stroke - _stroke) / appendix[0].range;
196 if (candidates.size() >= 2)
197 if (candidates[0].stroke > candidates[1].stroke)
198 std::reverse(candidates.begin(), candidates.end());
200 for (
unsigned int i = 0; i < candidates.size(); ++i)
201 if (_stroke <= candidates[i].stroke)
202 if (candidates[i].range == 0)
203 return candidates[i].angle;
205 return candidates[i].angle
206 - (candidates[i].stroke - _stroke) / candidates[i].range;
208 if (appendix.size() >= 2)
209 if (appendix[0].stroke > appendix[1].stroke)
210 std::reverse(appendix.begin(), appendix.end());
212 if (appendix.size() == 0) {
213 return candidates[candidates.size() - 1].angle;
215 if (appendix[0].range == 0)
216 return appendix[0].angle;
218 return appendix[0].angle
219 - (appendix[0].stroke - _stroke) / appendix[0].range;
227 int roundedStroke =
static_cast<int>(_stroke);
230 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
232 std::vector<S2AData> candidates = ref.first;
233 std::vector<S2AData> appendix = ref.second;
236 if (candidates.size() >= 2)
237 if (candidates[0].stroke < candidates[1].stroke)
238 std::reverse(candidates.begin(), candidates.end());
240 for (
unsigned int i = 0; i < candidates.size(); ++i)
241 if (_stroke >= candidates[i].stroke)
242 if (candidates[i].range == 0)
243 return candidates[i].angle;
245 return candidates[i].angle
246 - (candidates[i].stroke - _stroke) / candidates[i].range;
248 if (appendix.size() >= 2)
249 if (appendix[0].stroke < appendix[1].stroke)
250 std::reverse(appendix.begin(), appendix.end());
252 if (appendix.size() == 0) {
253 return candidates[candidates.size() - 1].angle;
255 if (appendix[0].range == 0)
256 return appendix[0].angle;
258 return appendix[0].angle
259 - (appendix[0].stroke - _stroke) / appendix[0].range;
264 if (candidates.size() >= 2)
265 if (candidates[0].stroke > candidates[1].stroke)
266 std::reverse(candidates.begin(), candidates.end());
268 for (
unsigned int i = 0; i < candidates.size(); ++i)
269 if (_stroke <= candidates[i].stroke)
270 if (candidates[i].range == 0)
271 return candidates[i].angle;
273 return candidates[i].angle
274 - (candidates[i].stroke - _stroke) / candidates[i].range;
276 if (appendix.size() >= 2)
277 if (appendix[0].stroke > appendix[1].stroke)
278 std::reverse(appendix.begin(), appendix.end());
280 if (appendix.size() == 0) {
281 return candidates[candidates.size() - 1].angle;
283 if (appendix[0].range == 0)
284 return appendix[0].angle;
286 return appendix[0].angle
287 - (appendix[0].stroke - _stroke) / appendix[0].range;
295 int roundedStroke =
static_cast<int>(_stroke);
298 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
300 std::vector<S2AData> candidates = ref.first;
301 std::vector<S2AData> appendix = ref.second;
304 if (candidates.size() >= 2)
305 if (candidates[0].stroke < candidates[1].stroke)
306 std::reverse(candidates.begin(), candidates.end());
308 for (
unsigned int i = 0; i < candidates.size(); ++i)
309 if (_stroke >= candidates[i].stroke)
310 if (candidates[i].range == 0)
311 return candidates[i].angle;
313 return candidates[i].angle
314 - (candidates[i].stroke - _stroke) / candidates[i].range;
316 if (appendix.size() >= 2)
317 if (appendix[0].stroke < appendix[1].stroke)
318 std::reverse(appendix.begin(), appendix.end());
320 if (appendix.size() == 0) {
321 return candidates[candidates.size() - 1].angle;
323 if (appendix[0].range == 0)
324 return appendix[0].angle;
326 return appendix[0].angle
327 - (appendix[0].stroke - _stroke) / appendix[0].range;
332 if (candidates.size() >= 2)
333 if (candidates[0].stroke > candidates[1].stroke)
334 std::reverse(candidates.begin(), candidates.end());
336 for (
unsigned int i = 0; i < candidates.size(); ++i)
337 if (_stroke <= candidates[i].stroke)
338 if (candidates[i].range == 0)
339 return candidates[i].angle;
341 return candidates[i].angle
342 - (candidates[i].stroke - _stroke) / candidates[i].range;
344 if (appendix.size() >= 2)
345 if (appendix[0].stroke > appendix[1].stroke)
346 std::reverse(appendix.begin(), appendix.end());
348 if (appendix.size() == 0) {
349 return candidates[candidates.size() - 1].angle;
351 if (appendix[0].range == 0)
352 return appendix[0].angle;
354 return appendix[0].angle
355 - (appendix[0].stroke - _stroke) / appendix[0].range;
363 int roundedStroke =
static_cast<int>(_stroke);
366 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
368 std::vector<S2AData> candidates = ref.first;
369 std::vector<S2AData> appendix = ref.second;
372 if (candidates.size() >= 2)
373 if (candidates[0].stroke < candidates[1].stroke)
374 std::reverse(candidates.begin(), candidates.end());
376 for (
unsigned int i = 0; i < candidates.size(); ++i)
377 if (_stroke >= candidates[i].stroke)
378 if (candidates[i].range == 0)
379 return candidates[i].angle;
381 return candidates[i].angle
382 - (candidates[i].stroke - _stroke) / candidates[i].range;
384 if (appendix.size() >= 2)
385 if (appendix[0].stroke < appendix[1].stroke)
386 std::reverse(appendix.begin(), appendix.end());
388 if (appendix.size() == 0) {
389 return candidates[candidates.size() - 1].angle;
391 if (appendix[0].range == 0)
392 return appendix[0].angle;
394 return appendix[0].angle
395 - (appendix[0].stroke - _stroke) / appendix[0].range;
400 if (candidates.size() >= 2)
401 if (candidates[0].stroke > candidates[1].stroke)
402 std::reverse(candidates.begin(), candidates.end());
404 for (
unsigned int i = 0; i < candidates.size(); ++i)
405 if (_stroke <= candidates[i].stroke)
406 if (candidates[i].range == 0)
407 return candidates[i].angle;
409 return candidates[i].angle
410 - (candidates[i].stroke - _stroke) / candidates[i].range;
412 if (appendix.size() >= 2)
413 if (appendix[0].stroke > appendix[1].stroke)
414 std::reverse(appendix.begin(), appendix.end());
416 if (appendix.size() == 0) {
417 return candidates[candidates.size() - 1].angle;
419 if (appendix[0].range == 0)
420 return appendix[0].angle;
422 return appendix[0].angle
423 - (appendix[0].stroke - _stroke) / appendix[0].range;
431 int roundedStroke =
static_cast<int>(_stroke);
434 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
436 std::vector<S2AData> candidates = ref.first;
437 std::vector<S2AData> appendix = ref.second;
440 if (candidates.size() >= 2)
441 if (candidates[0].stroke < candidates[1].stroke)
442 std::reverse(candidates.begin(), candidates.end());
444 for (
unsigned int i = 0; i < candidates.size(); ++i)
445 if (_stroke >= candidates[i].stroke)
446 if (candidates[i].range == 0)
447 return candidates[i].angle;
449 return candidates[i].angle
450 - (candidates[i].stroke - _stroke) / candidates[i].range;
452 if (appendix.size() >= 2)
453 if (appendix[0].stroke < appendix[1].stroke)
454 std::reverse(appendix.begin(), appendix.end());
456 if (appendix.size() == 0) {
457 return candidates[candidates.size() - 1].angle;
459 if (appendix[0].range == 0)
460 return appendix[0].angle;
462 return appendix[0].angle
463 - (appendix[0].stroke - _stroke) / appendix[0].range;
468 if (candidates.size() >= 2)
469 if (candidates[0].stroke > candidates[1].stroke)
470 std::reverse(candidates.begin(), candidates.end());
472 for (
unsigned int i = 0; i < candidates.size(); ++i)
473 if (_stroke <= candidates[i].stroke)
474 if (candidates[i].range == 0)
475 return candidates[i].angle;
477 return candidates[i].angle
478 - (candidates[i].stroke - _stroke) / candidates[i].range;
480 if (appendix.size() >= 2)
481 if (appendix[0].stroke > appendix[1].stroke)
482 std::reverse(appendix.begin(), appendix.end());
484 if (appendix.size() == 0) {
485 return candidates[candidates.size() - 1].angle;
487 if (appendix[0].range == 0)
488 return appendix[0].angle;
490 return appendix[0].angle
491 - (appendix[0].stroke - _stroke) / appendix[0].range;
499 int roundedStroke =
static_cast<int>(_stroke);
502 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
504 std::vector<S2AData> candidates = ref.first;
505 std::vector<S2AData> appendix = ref.second;
508 if (candidates.size() >= 2)
509 if (candidates[0].stroke < candidates[1].stroke)
510 std::reverse(candidates.begin(), candidates.end());
512 for (
unsigned int i = 0; i < candidates.size(); ++i)
513 if (_stroke >= candidates[i].stroke)
514 if (candidates[i].range == 0)
515 return candidates[i].angle;
517 return candidates[i].angle
518 - (candidates[i].stroke - _stroke) / candidates[i].range;
520 if (appendix.size() >= 2)
521 if (appendix[0].stroke < appendix[1].stroke)
522 std::reverse(appendix.begin(), appendix.end());
524 if (appendix.size() == 0) {
525 return candidates[candidates.size() - 1].angle;
527 if (appendix[0].range == 0)
528 return appendix[0].angle;
530 return appendix[0].angle
531 - (appendix[0].stroke - _stroke) / appendix[0].range;
536 if (candidates.size() >= 2)
537 if (candidates[0].stroke > candidates[1].stroke)
538 std::reverse(candidates.begin(), candidates.end());
540 for (
unsigned int i = 0; i < candidates.size(); ++i)
541 if (_stroke <= candidates[i].stroke)
542 if (candidates[i].range == 0)
543 return candidates[i].angle;
545 return candidates[i].angle
546 - (candidates[i].stroke - _stroke) / candidates[i].range;
548 if (appendix.size() >= 2)
549 if (appendix[0].stroke > appendix[1].stroke)
550 std::reverse(appendix.begin(), appendix.end());
552 if (appendix.size() == 0) {
553 return candidates[candidates.size() - 1].angle;
555 if (appendix[0].range == 0)
556 return appendix[0].angle;
558 return appendix[0].angle
559 - (appendix[0].stroke - _stroke) / appendix[0].range;
567 int roundedStroke =
static_cast<int>(_stroke);
570 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
572 std::vector<S2AData> candidates = ref.first;
573 std::vector<S2AData> appendix = ref.second;
576 if (candidates.size() >= 2)
577 if (candidates[0].stroke < candidates[1].stroke)
578 std::reverse(candidates.begin(), candidates.end());
580 for (
unsigned int i = 0; i < candidates.size(); ++i)
581 if (_stroke >= candidates[i].stroke)
582 if (candidates[i].range == 0)
583 return candidates[i].angle;
585 return candidates[i].angle
586 - (candidates[i].stroke - _stroke) / candidates[i].range;
588 if (appendix.size() >= 2)
589 if (appendix[0].stroke < appendix[1].stroke)
590 std::reverse(appendix.begin(), appendix.end());
592 if (appendix.size() == 0) {
593 return candidates[candidates.size() - 1].angle;
595 if (appendix[0].range == 0)
596 return appendix[0].angle;
598 return appendix[0].angle
599 - (appendix[0].stroke - _stroke) / appendix[0].range;
604 if (candidates.size() >= 2)
605 if (candidates[0].stroke > candidates[1].stroke)
606 std::reverse(candidates.begin(), candidates.end());
608 for (
unsigned int i = 0; i < candidates.size(); ++i)
609 if (_stroke <= candidates[i].stroke)
610 if (candidates[i].range == 0)
611 return candidates[i].angle;
613 return candidates[i].angle
614 - (candidates[i].stroke - _stroke) / candidates[i].range;
616 if (appendix.size() >= 2)
617 if (appendix[0].stroke > appendix[1].stroke)
618 std::reverse(appendix.begin(), appendix.end());
620 if (appendix.size() == 0) {
621 return candidates[candidates.size() - 1].angle;
623 if (appendix[0].range == 0)
624 return appendix[0].angle;
626 return appendix[0].angle
627 - (appendix[0].stroke - _stroke) / appendix[0].range;
635 int roundedStroke =
static_cast<int>(_stroke);
638 if(roundedStrokeIndex < 0) roundedStrokeIndex = 0;
640 std::vector<S2AData> candidates = ref.first;
641 std::vector<S2AData> appendix = ref.second;
644 if (candidates.size() >= 2)
645 if (candidates[0].stroke < candidates[1].stroke)
646 std::reverse(candidates.begin(), candidates.end());
648 for (
unsigned int i = 0; i < candidates.size(); ++i)
649 if (_stroke >= candidates[i].stroke)
650 if (candidates[i].range == 0)
651 return candidates[i].angle;
653 return candidates[i].angle
654 - (candidates[i].stroke - _stroke) / candidates[i].range;
656 if (appendix.size() >= 2)
657 if (appendix[0].stroke < appendix[1].stroke)
658 std::reverse(appendix.begin(), appendix.end());
660 if (appendix.size() == 0) {
661 return candidates[candidates.size() - 1].angle;
663 if (appendix[0].range == 0)
664 return appendix[0].angle;
666 return appendix[0].angle
667 - (appendix[0].stroke - _stroke) / appendix[0].range;
672 if (candidates.size() >= 2)
673 if (candidates[0].stroke > candidates[1].stroke)
674 std::reverse(candidates.begin(), candidates.end());
676 for (
unsigned int i = 0; i < candidates.size(); ++i)
677 if (_stroke <= candidates[i].stroke)
678 if (candidates[i].range == 0)
679 return candidates[i].angle;
681 return candidates[i].angle
682 - (candidates[i].stroke - _stroke) / candidates[i].range;
684 if (appendix.size() >= 2)
685 if (appendix[0].stroke > appendix[1].stroke)
686 std::reverse(appendix.begin(), appendix.end());
688 if (appendix.size() == 0) {
689 return candidates[candidates.size() - 1].angle;
691 if (appendix[0].range == 0)
692 return appendix[0].angle;
694 return appendix[0].angle
695 - (appendix[0].stroke - _stroke) / appendix[0].range;
float ShoulderRollInvTable(float _stroke)
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > WristRollInvTableCandidates
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > WristPitchInvTableCandidates
static const int ArrayElbowPitchInvTableOffset
static const int ArrayWristPitchInvTableOffset
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > ElbowPitchInvTableCandidates
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > WaistRollInvTableCandidates
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > NeckRollInvTableCandidates
float WristPitchInvTable(float _stroke)
float WristRollInvTable(float _stroke)
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > ShoulderRollInvTableCandidates
float WaistPitchInvTable(float _stroke)
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > LegInvTableCandidates
float NeckPitchInvTable(float _stroke)
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > NeckPitchInvTableCandidates
float ElbowPitchInvTable(float _stroke)
static const int ArrayNeckRollInvTableOffset
static const int ArrayWristRollInvTableOffset
float ShoulderPitchInvTable(float _stroke)
static const int ArrayShoulderRollInvTableOffset
static const int ArrayShoulderPitchInvTableOffset
static const int ArrayLegInvTableOffset
float NeckRollInvTable(float _stroke)
static const int ArrayWaistRollInvTableOffset
float WaistRollInvTable(float _stroke)
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > WaistPitchInvTableCandidates
static const std::vector< std::pair< std::vector< S2AData >, std::vector< S2AData > > > ShoulderPitchInvTableCandidates
float LegInvTable(float _stroke)
static const int ArrayNeckPitchInvTableOffset
static const int ArrayWaistPitchInvTableOffset