{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/comments/77738335","id":77738335,"diff_hunk":"@@ -24,66 +47,177 @@ public partial class GestureManager : Singleton<GestureManager>\n         /// set the override focused object.\n         /// If its null, then the gazed at object will be selected.\n         /// </summary>\n-        public GameObject OverrideFocusedObject\n-        {\n-            get; set;\n-        }\n-\n+        public GameObject OverrideFocusedObject { get; set; }\n+        \n         /// <summary>\n         /// Gets the currently focused object, or null if none.\n         /// </summary>\n-        public GameObject FocusedObject\n+        public GameObject FocusedObject { get; private set; }\n+\n+        /// <summary>\n+        /// Whether or not a manipulation gesture is currently in progress\n+        /// </summary>\n+        public bool ManipulationInProgress { get; private set; }\n+\n+        /// <summary>\n+        /// The offset of the hand from its position at the beginning of \n+        /// the currently active manipulation gesture, in world space.  Not valid if\n+        /// a manipulation gesture is not in progress\n+        /// </summary>\n+        public Vector3 ManipulationOffset { get; private set; }\n+\n+        /// <summary>\n+        /// The world space position of the hand being used for the current manipulation gesture.  Not valid\n+        /// if a manipulation gesture is not in progress.\n+        /// </summary>\n+        public Vector3 ManipulationHandPosition\n         {\n-            get { return focusedObject; }\n+            get\n+            {\n+                Vector3 handPosition = Vector3.zero;\n+                currentHandState.properties.location.TryGetPosition(out handPosition);\n+                return handPosition;\n+            }\n         }\n \n         private GestureRecognizer gestureRecognizer;\n-        private GameObject focusedObject;\n+        private GestureRecognizer manipulationRecognizer;\n+\n+        private bool HandPressed { get { return pressedHands.Count > 0; } }\n+        private HashSet<uint> pressedHands = new HashSet<uint>();\n+\n+        private InteractionSourceState currentHandState;\n \n         void Start()\n         {\n+            InteractionManager.SourcePressed += InteractionManager_SourcePressed;\n+            InteractionManager.SourceReleased += InteractionManager_SourceReleased;\n+            InteractionManager.SourceUpdated += InteractionManager_SourceUpdated;\n+            InteractionManager.SourceLost += InteractionManager_SourceLost;\n+\n             // Create a new GestureRecognizer. Sign up for tapped events.\n             gestureRecognizer = new GestureRecognizer();\n             gestureRecognizer.SetRecognizableGestures(GestureSettings.Tap);\n \n+            manipulationRecognizer = new GestureRecognizer();","path":"Assets/HoloToolkit/Input/Scripts/GestureManager.cs","position":108,"original_position":108,"commit_id":"368f0156db889f90dfab4b9f62de84c957c8a15b","original_commit_id":"368f0156db889f90dfab4b9f62de84c957c8a15b","user":{"login":"jwittner","id":12958442,"avatar_url":"https://avatars.githubusercontent.com/u/12958442?v=3","gravatar_id":"","url":"https://api.github.com/users/jwittner","html_url":"https://github.com/jwittner","followers_url":"https://api.github.com/users/jwittner/followers","following_url":"https://api.github.com/users/jwittner/following{/other_user}","gists_url":"https://api.github.com/users/jwittner/gists{/gist_id}","starred_url":"https://api.github.com/users/jwittner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwittner/subscriptions","organizations_url":"https://api.github.com/users/jwittner/orgs","repos_url":"https://api.github.com/users/jwittner/repos","events_url":"https://api.github.com/users/jwittner/events{/privacy}","received_events_url":"https://api.github.com/users/jwittner/received_events","type":"User","site_admin":false},"body":"I agree, as I'm not sure why we're not using the other one.","created_at":"2016-09-06T23:39:14Z","updated_at":"2016-09-06T23:39:14Z","html_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196#discussion_r77738335","pull_request_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/comments/77738335"},"html":{"href":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196#discussion_r77738335"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196","id":83369072,"html_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196","diff_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196.diff","patch_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196.patch","issue_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/196","number":196,"state":"open","locked":false,"title":"Adding support for hand based object manipulation","user":{"login":"micthom-msft","id":20446190,"avatar_url":"https://avatars.githubusercontent.com/u/20446190?v=3","gravatar_id":"","url":"https://api.github.com/users/micthom-msft","html_url":"https://github.com/micthom-msft","followers_url":"https://api.github.com/users/micthom-msft/followers","following_url":"https://api.github.com/users/micthom-msft/following{/other_user}","gists_url":"https://api.github.com/users/micthom-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/micthom-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micthom-msft/subscriptions","organizations_url":"https://api.github.com/users/micthom-msft/orgs","repos_url":"https://api.github.com/users/micthom-msft/repos","events_url":"https://api.github.com/users/micthom-msft/events{/privacy}","received_events_url":"https://api.github.com/users/micthom-msft/received_events","type":"User","site_admin":false},"body":"Holograms 211 contains a relatively simple implementation of hand based\r\nobject manipulation.  That implementation uses the world space deltas\r\nto move holograms exactly as the hand moves.  This works fine in some\r\ncases, but becomes limiting in more sophisticated manipulation\r\nscenarios.\r\n\r\nThe implementation in this change is taken directly from 3D Viewer\r\nand ActionGrams and supports more sophisticated movement scenarios\r\nwhich combine both gesture and gaze.  For example, with this new\r\nimplementation if you manipulate a hologram and then turn your head\r\nthe hologram will move with your head, while still allowing you to make\r\nadjustments with your hands.  If you manipulate a hologram and then\r\nwalk somewhere else the hologram will move with you as long as you\r\nmaintain the gesture.  This allows for users to make large adjustments\r\nusing their gaze and position, while making smaller adjustments with\r\ntheir hands, resulting in more intuitive and effective manipulation.","created_at":"2016-08-31T00:12:29Z","updated_at":"2016-09-06T23:39:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2bff22ba075df70b640b47725c50171416de79c0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196/commits","review_comments_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196/comments","review_comment_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/196/comments","statuses_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/statuses/368f0156db889f90dfab4b9f62de84c957c8a15b","head":{"label":"micthom-msft:master","ref":"master","sha":"368f0156db889f90dfab4b9f62de84c957c8a15b","user":{"login":"micthom-msft","id":20446190,"avatar_url":"https://avatars.githubusercontent.com/u/20446190?v=3","gravatar_id":"","url":"https://api.github.com/users/micthom-msft","html_url":"https://github.com/micthom-msft","followers_url":"https://api.github.com/users/micthom-msft/followers","following_url":"https://api.github.com/users/micthom-msft/following{/other_user}","gists_url":"https://api.github.com/users/micthom-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/micthom-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micthom-msft/subscriptions","organizations_url":"https://api.github.com/users/micthom-msft/orgs","repos_url":"https://api.github.com/users/micthom-msft/repos","events_url":"https://api.github.com/users/micthom-msft/events{/privacy}","received_events_url":"https://api.github.com/users/micthom-msft/received_events","type":"User","site_admin":false},"repo":{"id":63798909,"name":"HoloToolkit-Unity","full_name":"micthom-msft/HoloToolkit-Unity","owner":{"login":"micthom-msft","id":20446190,"avatar_url":"https://avatars.githubusercontent.com/u/20446190?v=3","gravatar_id":"","url":"https://api.github.com/users/micthom-msft","html_url":"https://github.com/micthom-msft","followers_url":"https://api.github.com/users/micthom-msft/followers","following_url":"https://api.github.com/users/micthom-msft/following{/other_user}","gists_url":"https://api.github.com/users/micthom-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/micthom-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micthom-msft/subscriptions","organizations_url":"https://api.github.com/users/micthom-msft/orgs","repos_url":"https://api.github.com/users/micthom-msft/repos","events_url":"https://api.github.com/users/micthom-msft/events{/privacy}","received_events_url":"https://api.github.com/users/micthom-msft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/micthom-msft/HoloToolkit-Unity","description":"This is effectively part of the existing HoloToolkit, but is the repo that will contain all Unity specific components.","fork":true,"url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity","forks_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/forks","keys_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/teams","hooks_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/hooks","issue_events_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/issues/events{/number}","events_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/events","assignees_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/assignees{/user}","branches_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/branches{/branch}","tags_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/tags","blobs_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/git/refs{/sha}","trees_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/statuses/{sha}","languages_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/languages","stargazers_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/stargazers","contributors_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/contributors","subscribers_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/subscribers","subscription_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/subscription","commits_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/commits{/sha}","git_commits_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/git/commits{/sha}","comments_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/comments{/number}","issue_comment_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/issues/comments{/number}","contents_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/contents/{+path}","compare_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/merges","archive_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/downloads","issues_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/issues{/number}","pulls_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/pulls{/number}","milestones_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/milestones{/number}","notifications_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/labels{/name}","releases_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/releases{/id}","deployments_url":"https://api.github.com/repos/micthom-msft/HoloToolkit-Unity/deployments","created_at":"2016-07-20T16:57:24Z","updated_at":"2016-07-20T16:57:26Z","pushed_at":"2016-09-02T00:04:18Z","git_url":"git://github.com/micthom-msft/HoloToolkit-Unity.git","ssh_url":"git@github.com:micthom-msft/HoloToolkit-Unity.git","clone_url":"https://github.com/micthom-msft/HoloToolkit-Unity.git","svn_url":"https://github.com/micthom-msft/HoloToolkit-Unity","homepage":"","size":43610,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"bad19c8b16c7d091f1047180b72710a66b47a40c","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":50605426,"name":"HoloToolkit-Unity","full_name":"Microsoft/HoloToolkit-Unity","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/HoloToolkit-Unity","description":"This is effectively part of the existing HoloToolkit, but is the repo that will contain all Unity specific components.","fork":false,"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity","forks_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/forks","keys_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/teams","hooks_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/events","assignees_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/tags","blobs_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/languages","stargazers_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/subscription","commits_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/merges","archive_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/downloads","issues_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/deployments","created_at":"2016-01-28T18:54:58Z","updated_at":"2016-09-06T22:13:16Z","pushed_at":"2016-09-06T18:30:20Z","git_url":"git://github.com/Microsoft/HoloToolkit-Unity.git","ssh_url":"git@github.com:Microsoft/HoloToolkit-Unity.git","clone_url":"https://github.com/Microsoft/HoloToolkit-Unity.git","svn_url":"https://github.com/Microsoft/HoloToolkit-Unity","homepage":"","size":43821,"stargazers_count":244,"watchers_count":244,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"open_issues_count":29,"forks":150,"open_issues":29,"watchers":244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196"},"html":{"href":"https://github.com/Microsoft/HoloToolkit-Unity/pull/196"},"issue":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/196"},"comments":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/statuses/368f0156db889f90dfab4b9f62de84c957c8a15b"}}}}
{"actor":{"display_login":"jwittner"}}