8 #include "HandTrackingClient/VecMath.h"
9 #include "HandTrackingClient/OpenCVCamera.h"
27 namespace HandTrackingClient
31 const static int N_JOINTS = 17;
34 const static int N_FINGERS = 5;
37 const static int N_HANDS = 2;
42 const static int N_POSES = 7;
45 const static int N_FINGER_DOFS_PER_HAND = 16;
133 const int clickCount)
134 : _position(position),
136 _clickCount(clickCount) { }
190 :
public std::exception
197 virtual const char* what()
const throw() {
return _msg; }
252 virtual std::string
serialize()
const = 0;
279 const int clickCountLeft,
282 const int clickCountRight);
291 std::array<HandState, N_HANDS> _hands;
316 const int clickCountLeft,
319 const int clickCountRight);
380 const int clickCountLeft,
383 const int clickCountRight);
404 const float confidence);
455 const int clickCountLeft,
458 const int clickCountRight,
459 const std::array<float, N_HANDS>& confidenceEstimates,
460 const std::array<std::array<Quaternionf, N_JOINTS>, N_HANDS>& jointRotations,
461 const std::array<std::array<Vector3f, N_JOINTS>, N_HANDS>& jointTranslations,
462 const std::array<std::array<float, N_FINGER_DOFS_PER_HAND>, N_HANDS>& fingerDOFs,
463 const std::array<std::array<Vector3f, N_FINGERS>, N_HANDS>& fingerTips,
464 const std::array<std::array<float, N_POSES>, N_HANDS>& handPoseConfidences);
499 const std::array<float, N_FINGER_DOFS_PER_HAND>&
getFingerDOFs(
size_t hand)
const {
return _fingerDOFs[hand]; }
502 const std::array<Vector3f, N_FINGERS>&
getFingerTips(
size_t hand)
const {
return _fingerTips[hand]; }
512 std::array<float, N_HANDS> _confidenceEstimates;
513 std::array<std::array<Quaternionf, N_JOINTS>, N_HANDS> _jointRotations;
514 std::array<std::array<Vector3f, N_JOINTS>, N_HANDS> _jointTranslations;
515 std::array<std::array<float, N_FINGER_DOFS_PER_HAND>, N_HANDS> _fingerDOFs;
516 std::array<std::array<Vector3f, N_FINGERS>, N_HANDS> _fingerTips;
517 std::array<std::array<float, N_POSES>, N_HANDS> _handPoseConfidences;
530 const std::string& protocolVersion,
531 const std::vector<OpenCVCamera>& cameras);
547 const std::vector<OpenCVCamera>&
getCameras()
const {
return _cameras; }
550 std::string _serverVersion;
551 std::string _protocolVersion;
553 std::vector<OpenCVCamera> _cameras;
580 typedef std::vector<int> IndicesVector;
583 typedef std::vector<float> WeightsVector;
595 const std::vector<Vector3f>&
getRestPositions(
int hand)
const {
return _restPositions[hand]; }
598 const std::vector<Triangle>&
getTriangles(
int hand)
const {
return _triangles[hand]; }
601 const std::vector<IndicesVector>&
getSkinningIndices(
int hand)
const {
return _skinningIndices[hand]; }
651 const std::vector<WeightsVector>&
getSkinningWeights(
int hand)
const {
return _skinningWeights[hand]; }
661 const std::array<std::vector<Vector3f>, N_HANDS>& restPositions,
662 const std::array<std::vector<Triangle>, N_HANDS>& triangles,
663 const std::array<std::vector<IndicesVector>, N_HANDS>& skinningIndices,
664 const std::array<std::vector<WeightsVector>, N_HANDS>& skinningWeights,
665 const std::array<std::array<Quaternionf, N_JOINTS>, N_HANDS>& restJointRotations,
666 const std::array<std::array<Vector3f, N_JOINTS>, N_HANDS>& restJointTranslations);
673 std::string _userProfileName;
674 std::array<std::vector<Vector3f>, N_HANDS> _restPositions;
675 std::array<std::vector<Triangle>, N_HANDS> _triangles;
676 std::array<std::vector<IndicesVector>, N_HANDS> _skinningIndices;
677 std::array<std::vector<WeightsVector>, N_HANDS> _skinningWeights;
678 std::array<std::array<Quaternionf, N_JOINTS>, N_HANDS> _restJointRotations;
679 std::array<std::array<Vector3f, N_JOINTS>, N_HANDS> _restJointTranslations;
696 const float currentScale) : _percentComplete(percentComplete),
697 _currentScale(currentScale) {}
711 float _percentComplete;