GitHub PullRequestReviewCommentEvent at 2014-08-08 00:31:50
Repository: hifi
Actor: AndrewMeadows
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/15973083","id":15973083,"diff_hunk":"@@ -30,21 +37,79 @@ void Ragdoll::stepRagdollForward(float deltaTime) {\n }\n     \n void Ragdoll::clearRagdollConstraintsAndPoints() {\n-    int numConstraints = _ragdollConstraints.size();\n+    int numConstraints = _boneConstraints.size();\n+    for (int i = 0; i < numConstraints; ++i) {\n+        delete _boneConstraints[i];\n+    }\n+    _boneConstraints.clear();\n+    numConstraints = _fixedConstraints.size();\n     for (int i = 0; i < numConstraints; ++i) {\n-        delete _ragdollConstraints[i];\n+        delete _fixedConstraints[i];\n     }\n-    _ragdollConstraints.clear();\n+    _fixedConstraints.clear();\n     _ragdollPoints.clear();\n }\n \n float Ragdoll::enforceRagdollConstraints() {\n     float maxDistance = 0.0f;\n-    const int numConstraints = _ragdollConstraints.size();\n+    // enforce the bone constraints first\n+    int numConstraints = _boneConstraints.size();\n     for (int i = 0; i < numConstraints; ++i) {\n-        DistanceConstraint* c = static_cast<DistanceConstraint*>(_ragdollConstraints[i]);\n-        //maxDistance = glm::max(maxDistance, _ragdollConstraints[i]->enforce());\n-        maxDistance = glm::max(maxDistance, c->enforce());\n+        maxDistance = glm::max(maxDistance, _boneConstraints[i]->enforce());\n+    }\n+    // enforce FixedConstraints second\n+    numConstraints = _fixedConstraints.size();\n+    for (int i = 0; i < _fixedConstraints.size(); ++i) {\n+        maxDistance = glm::max(maxDistance, _fixedConstraints[i]->enforce());\n     }","path":"libraries/shared/src/Ragdoll.cpp","position":64,"original_position":64,"commit_id":"9a55252587f1c02fe5fa88ce8e88c55e8aabf46f","original_commit_id":"9a55252587f1c02fe5fa88ce8e88c55e8aabf46f","user":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=2","gravatar_id":"3108882716bb8dbfd1f990b6b04334b1","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"body":"I split the FixedConstraints out of the DistanceConstraints (_boneConstraints) so that they could be enforced AFTER the other constraints.  More winning on the side of the FixedConstraint is good, although to allow the avatar to be pushed around I'll probably have to reduce the FixedConstraint's strength at the base of the Ragdoll, measure its deflection, and use that to shift the avatar around.  But that is for another day.","created_at":"2014-08-08T00:31:50Z","updated_at":"2014-08-08T00:31:50Z","html_url":"https://github.com/highfidelity/hifi/pull/3263#discussion_r15973083","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/3263","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/15973083"},"html":{"href":"https://github.com/highfidelity/hifi/pull/3263#discussion_r15973083"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/3263"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/3263","id":19503140,"html_url":"https://github.com/highfidelity/hifi/pull/3263","diff_url":"https://github.com/highfidelity/hifi/pull/3263.diff","patch_url":"https://github.com/highfidelity/hifi/pull/3263.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/3263","number":3263,"state":"open","title":"Ragdoll Part 9: ","user":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=2","gravatar_id":"3108882716bb8dbfd1f990b6b04334b1","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"body":"Adds the nearest avatar (if close enough) to the ragdoll simulation (only adding one other avatar ATM until the broadphase culling system scales better as we increase the number of shapes to the simulation).\r\n\r\nThe ragdoll positions are now stored in the \"MyAvatar-relative-frame\" -- the cardinal axes are parallel to those of world-frame, but the origin of the simulation is at MyAvatar's hips.  Should not be noticable to the end user, but was needed to add more ragdolls and will show up in the diffs.\r\n\r\nThe two ragdolls do interact, but the other avatar will only respond if it is doing the simulation correctly on its end.  Dunno how well this works because I wasn't able to test it much with a single computer.\r\n\r\nKnown issues:\r\n\r\n(1) Trying to walk into another avatar will disrupt your avatar's skeleton but won't deflect the the avatar's position.  Work needs to be done here to allow avatars to push each other around.\r\n\r\n(2) None of the problems mentioned in Part 8 have been fixed.  The priority was to get a second avatar in the system.","created_at":"2014-08-08T00:17:05Z","updated_at":"2014-08-08T00:31:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"785b789211e8cdc826b401afe41baabf77ca7224","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/3263/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/3263/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/{number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/3263/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/9a55252587f1c02fe5fa88ce8e88c55e8aabf46f","head":{"label":"AndrewMeadows:ragdoll","ref":"ragdoll","sha":"9a55252587f1c02fe5fa88ce8e88c55e8aabf46f","user":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=2","gravatar_id":"3108882716bb8dbfd1f990b6b04334b1","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"repo":{"id":15350502,"name":"hifi","full_name":"AndrewMeadows/hifi","owner":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=2","gravatar_id":"3108882716bb8dbfd1f990b6b04334b1","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AndrewMeadows/hifi","description":"Open, decentralized virtual world using sensors to control avatars and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.io/jobs  You can also contribute by doing jobs listed at http://worklist.net/worklist.php","fork":true,"url":"https://api.github.com/repos/AndrewMeadows/hifi","forks_url":"https://api.github.com/repos/AndrewMeadows/hifi/forks","keys_url":"https://api.github.com/repos/AndrewMeadows/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndrewMeadows/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndrewMeadows/hifi/teams","hooks_url":"https://api.github.com/repos/AndrewMeadows/hifi/hooks","issue_events_url":"https://api.github.com/repos/AndrewMeadows/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/AndrewMeadows/hifi/events","assignees_url":"https://api.github.com/repos/AndrewMeadows/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/AndrewMeadows/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/AndrewMeadows/hifi/tags","blobs_url":"https://api.github.com/repos/AndrewMeadows/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndrewMeadows/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndrewMeadows/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndrewMeadows/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndrewMeadows/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/AndrewMeadows/hifi/languages","stargazers_url":"https://api.github.com/repos/AndrewMeadows/hifi/stargazers","contributors_url":"https://api.github.com/repos/AndrewMeadows/hifi/contributors","subscribers_url":"https://api.github.com/repos/AndrewMeadows/hifi/subscribers","subscription_url":"https://api.github.com/repos/AndrewMeadows/hifi/subscription","commits_url":"https://api.github.com/repos/AndrewMeadows/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndrewMeadows/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndrewMeadows/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndrewMeadows/hifi/issues/comments/{number}","contents_url":"https://api.github.com/repos/AndrewMeadows/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/AndrewMeadows/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndrewMeadows/hifi/merges","archive_url":"https://api.github.com/repos/AndrewMeadows/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndrewMeadows/hifi/downloads","issues_url":"https://api.github.com/repos/AndrewMeadows/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/AndrewMeadows/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/AndrewMeadows/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/AndrewMeadows/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndrewMeadows/hifi/labels{/name}","releases_url":"https://api.github.com/repos/AndrewMeadows/hifi/releases{/id}","created_at":"2013-12-20T23:18:13Z","updated_at":"2014-06-25T16:52:10Z","pushed_at":"2014-08-08T00:03:29Z","git_url":"git://github.com/AndrewMeadows/hifi.git","ssh_url":"git@github.com:AndrewMeadows/hifi.git","clone_url":"https://github.com/AndrewMeadows/hifi.git","svn_url":"https://github.com/AndrewMeadows/hifi","homepage":"http://highfidelity.io","size":115951,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"03985a3bd45797ab84b213fd01ecb5821f930049","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=2","gravatar_id":"46874b00c748488b5fa31e729cc27d94","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=2","gravatar_id":"46874b00c748488b5fa31e729cc27d94","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open, decentralized virtual worlds using sensors to control avatars and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.io/jobs  You can also contribute by doing jobs listed at http://worklist.net -","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments/{number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2014-08-04T23:53:04Z","pushed_at":"2014-08-07T22:14:31Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"http://highfidelity.io","size":169219,"stargazers_count":176,"watchers_count":176,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":110,"mirror_url":null,"open_issues_count":197,"forks":110,"open_issues":197,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/3263"},"html":{"href":"https://github.com/highfidelity/hifi/pull/3263"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/3263"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/3263/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/3263/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/3263/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/9a55252587f1c02fe5fa88ce8e88c55e8aabf46f"}}}}