{"action":"created","comment":{"url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/comments/118527550","pull_request_review_id":40328901,"id":118527550,"diff_hunk":"@@ -0,0 +1,168 @@\n+/** @file\n+    @brief Implementation\n+\n+    @date 2016\n+\n+    @author\n+    Sensics, Inc.\n+    <http://sensics.com/osvr>\n+*/\n+\n+// Copyright 2016 Sensics, Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//        http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+// Internal Includes\n+#include <osvr/Client/SkeletonConfig.h>\n+#include <osvr/Common/ApplyPathNodeVisitor.h>\n+#include <osvr/Common/PathElementTools.h>\n+#include <osvr/Common/PathElementTypes.h>\n+#include <osvr/Common/PathNode.h>\n+#include <osvr/Common/PathTreeFull.h>\n+#include <osvr/Common/ProcessArticulationSpec.h>\n+#include <osvr/Util/SharedPtr.h>\n+#include <osvr/Util/TreeNode.h>\n+#include <osvr/Util/TreeTraversalVisitor.h>\n+#include <osvr/Util/Verbosity.h>\n+\n+// Library/third-party includes\n+#include <boost/algorithm/string/erase.hpp>\n+#include <boost/algorithm/string/predicate.hpp>\n+#include <boost/variant/get.hpp>\n+\n+// Standard includes\n+\n+namespace osvr {\n+namespace client {\n+\n+    class ArticulationTreeTraverser : public boost::static_visitor<> {\n+      public:\n+        /// @brief Constructor\n+        ArticulationTreeTraverser(osvr::common::RegisteredStringMap *jointMap,\n+                                  osvr::common::RegisteredStringMap *boneMap,\n+                                  InterfaceMap *jointInterfaces,\n+                                  OSVR_ClientContext &ctx)\n+            : boost::static_visitor<>(), m_jointMap(jointMap),\n+              m_boneMap(boneMap), m_jointInterfaces(jointInterfaces),\n+              m_ctx(ctx) {}\n+\n+        /// @brief ignore null element\n+        void operator()(osvr::common::PathNode const &,\n+                        osvr::common::elements::NullElement const &) {}\n+\n+        void\n+        operator()(osvr::common::PathNode const &node,\n+                   osvr::common::elements::ArticulationElement const &elt) {\n+\n+            /// register joints\n+            if (elt.getArticulationType() == \"joint\") {\n+\n+                /// register joint ID\n+                util::StringID jointID =\n+                    m_jointMap->registerStringID(node.getName());\n+                /// get an interface for tracker path\n+\n+                /// store the id, interface association\n+                m_jointInterfaces->push_back(std::make_pair(\n+                    jointID, InternalInterfaceOwner(\n+                                 m_ctx, elt.getTrackerPath().c_str())));\n+\n+                /// Specifying bone name for each joint is optional\n+                if (!elt.getBoneName().empty()) {\n+                    /// register boneId\n+                    util::StringID boneId =\n+                        m_boneMap->registerStringID(elt.getBoneName());\n+                }\n+            }\n+        }\n+\n+        /// @brief Catch-all for other element types.\n+        template <typename T>\n+        void operator()(osvr::common::PathNode const &node, T const &elt) {}\n+\n+      private:\n+        osvr::common::RegisteredStringMap *m_jointMap;\n+        osvr::common::RegisteredStringMap *m_boneMap;\n+        InterfaceMap *m_jointInterfaces;\n+        OSVR_ClientContext m_ctx;\n+    };\n+\n+    class NodeToTrackerPathVisitor : public boost::static_visitor<std::string> {\n+      public:\n+        /// @brief Constructor\n+        NodeToTrackerPathVisitor() : boost::static_visitor<std::string>() {}\n+\n+        std::string const\n+        operator()(osvr::common::PathNode const &node,\n+                   osvr::common::elements::ArticulationElement const &elt) {\n+            return elt.getTrackerPath();\n+        }\n+\n+        /// @brief Catch-all for other element types.\n+        template <typename T>\n+        std::string const operator()(osvr::common::PathNode const &node,\n+                                     T const &elt) {\n+            return std::string();\n+        }\n+    };\n+\n+    SkeletonConfigPtr SkeletonConfigFactory::create(\n+        OSVR_ClientContext ctx,\n+        osvr::common::PathTree const &articulationTree) {\n+\n+        if (ctx->getStatus()) {","path":"src/osvr/Client/SkeletonConfig.cpp","position":null,"original_position":123,"commit_id":"dcf0aac4671cfc157bf51c65b823b5a0b4d46b5d","original_commit_id":"ccd8d77e9a4ff7146ca269165c135b11008b1f25","user":{"login":"mars979","id":10812091,"avatar_url":"https://avatars2.githubusercontent.com/u/10812091?v=3","gravatar_id":"","url":"https://api.github.com/users/mars979","html_url":"https://github.com/mars979","followers_url":"https://api.github.com/users/mars979/followers","following_url":"https://api.github.com/users/mars979/following{/other_user}","gists_url":"https://api.github.com/users/mars979/gists{/gist_id}","starred_url":"https://api.github.com/users/mars979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mars979/subscriptions","organizations_url":"https://api.github.com/users/mars979/orgs","repos_url":"https://api.github.com/users/mars979/repos","events_url":"https://api.github.com/users/mars979/events{/privacy}","received_events_url":"https://api.github.com/users/mars979/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2017-05-25T16:41:43Z","updated_at":"2017-05-25T16:41:43Z","html_url":"https://github.com/OSVR/OSVR-Core/pull/258#discussion_r118527550","pull_request_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258","_links":{"self":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/comments/118527550"},"html":{"href":"https://github.com/OSVR/OSVR-Core/pull/258#discussion_r118527550"},"pull_request":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258","id":49920545,"html_url":"https://github.com/OSVR/OSVR-Core/pull/258","diff_url":"https://github.com/OSVR/OSVR-Core/pull/258.diff","patch_url":"https://github.com/OSVR/OSVR-Core/pull/258.patch","issue_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/258","number":258,"state":"open","locked":false,"title":"Skeleton","user":{"login":"mars979","id":10812091,"avatar_url":"https://avatars2.githubusercontent.com/u/10812091?v=3","gravatar_id":"","url":"https://api.github.com/users/mars979","html_url":"https://github.com/mars979","followers_url":"https://api.github.com/users/mars979/followers","following_url":"https://api.github.com/users/mars979/following{/other_user}","gists_url":"https://api.github.com/users/mars979/gists{/gist_id}","starred_url":"https://api.github.com/users/mars979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mars979/subscriptions","organizations_url":"https://api.github.com/users/mars979/orgs","repos_url":"https://api.github.com/users/mars979/repos","events_url":"https://api.github.com/users/mars979/events{/privacy}","received_events_url":"https://api.github.com/users/mars979/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-06T06:32:50Z","updated_at":"2017-05-25T16:41:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef94f05b62d59b8048a0c68c0706ce18247ac85e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258/commits","review_comments_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258/comments","review_comment_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/258/comments","statuses_url":"https://api.github.com/repos/OSVR/OSVR-Core/statuses/dcf0aac4671cfc157bf51c65b823b5a0b4d46b5d","head":{"label":"OSVR:skeleton","ref":"skeleton","sha":"dcf0aac4671cfc157bf51c65b823b5a0b4d46b5d","user":{"login":"OSVR","id":10343613,"avatar_url":"https://avatars3.githubusercontent.com/u/10343613?v=3","gravatar_id":"","url":"https://api.github.com/users/OSVR","html_url":"https://github.com/OSVR","followers_url":"https://api.github.com/users/OSVR/followers","following_url":"https://api.github.com/users/OSVR/following{/other_user}","gists_url":"https://api.github.com/users/OSVR/gists{/gist_id}","starred_url":"https://api.github.com/users/OSVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSVR/subscriptions","organizations_url":"https://api.github.com/users/OSVR/orgs","repos_url":"https://api.github.com/users/OSVR/repos","events_url":"https://api.github.com/users/OSVR/events{/privacy}","received_events_url":"https://api.github.com/users/OSVR/received_events","type":"Organization","site_admin":false},"repo":{"id":25528375,"name":"OSVR-Core","full_name":"OSVR/OSVR-Core","owner":{"login":"OSVR","id":10343613,"avatar_url":"https://avatars3.githubusercontent.com/u/10343613?v=3","gravatar_id":"","url":"https://api.github.com/users/OSVR","html_url":"https://github.com/OSVR","followers_url":"https://api.github.com/users/OSVR/followers","following_url":"https://api.github.com/users/OSVR/following{/other_user}","gists_url":"https://api.github.com/users/OSVR/gists{/gist_id}","starred_url":"https://api.github.com/users/OSVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSVR/subscriptions","organizations_url":"https://api.github.com/users/OSVR/orgs","repos_url":"https://api.github.com/users/OSVR/repos","events_url":"https://api.github.com/users/OSVR/events{/privacy}","received_events_url":"https://api.github.com/users/OSVR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSVR/OSVR-Core","description":"The core libraries, applications, and plugins of the OSVR software platform.","fork":false,"url":"https://api.github.com/repos/OSVR/OSVR-Core","forks_url":"https://api.github.com/repos/OSVR/OSVR-Core/forks","keys_url":"https://api.github.com/repos/OSVR/OSVR-Core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSVR/OSVR-Core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSVR/OSVR-Core/teams","hooks_url":"https://api.github.com/repos/OSVR/OSVR-Core/hooks","issue_events_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/events{/number}","events_url":"https://api.github.com/repos/OSVR/OSVR-Core/events","assignees_url":"https://api.github.com/repos/OSVR/OSVR-Core/assignees{/user}","branches_url":"https://api.github.com/repos/OSVR/OSVR-Core/branches{/branch}","tags_url":"https://api.github.com/repos/OSVR/OSVR-Core/tags","blobs_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSVR/OSVR-Core/statuses/{sha}","languages_url":"https://api.github.com/repos/OSVR/OSVR-Core/languages","stargazers_url":"https://api.github.com/repos/OSVR/OSVR-Core/stargazers","contributors_url":"https://api.github.com/repos/OSVR/OSVR-Core/contributors","subscribers_url":"https://api.github.com/repos/OSVR/OSVR-Core/subscribers","subscription_url":"https://api.github.com/repos/OSVR/OSVR-Core/subscription","commits_url":"https://api.github.com/repos/OSVR/OSVR-Core/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Core/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSVR/OSVR-Core/contents/{+path}","compare_url":"https://api.github.com/repos/OSVR/OSVR-Core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSVR/OSVR-Core/merges","archive_url":"https://api.github.com/repos/OSVR/OSVR-Core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSVR/OSVR-Core/downloads","issues_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues{/number}","pulls_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls{/number}","milestones_url":"https://api.github.com/repos/OSVR/OSVR-Core/milestones{/number}","notifications_url":"https://api.github.com/repos/OSVR/OSVR-Core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSVR/OSVR-Core/labels{/name}","releases_url":"https://api.github.com/repos/OSVR/OSVR-Core/releases{/id}","deployments_url":"https://api.github.com/repos/OSVR/OSVR-Core/deployments","created_at":"2014-10-21T14:56:46Z","updated_at":"2017-05-23T17:20:54Z","pushed_at":"2017-05-25T16:32:29Z","git_url":"git://github.com/OSVR/OSVR-Core.git","ssh_url":"git@github.com:OSVR/OSVR-Core.git","clone_url":"https://github.com/OSVR/OSVR-Core.git","svn_url":"https://github.com/OSVR/OSVR-Core","homepage":"","size":14039,"stargazers_count":250,"watchers_count":250,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":210,"forks":107,"open_issues":210,"watchers":250,"default_branch":"master"}},"base":{"label":"OSVR:master","ref":"master","sha":"597739245a132823bd7b345700923613a190d569","user":{"login":"OSVR","id":10343613,"avatar_url":"https://avatars3.githubusercontent.com/u/10343613?v=3","gravatar_id":"","url":"https://api.github.com/users/OSVR","html_url":"https://github.com/OSVR","followers_url":"https://api.github.com/users/OSVR/followers","following_url":"https://api.github.com/users/OSVR/following{/other_user}","gists_url":"https://api.github.com/users/OSVR/gists{/gist_id}","starred_url":"https://api.github.com/users/OSVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSVR/subscriptions","organizations_url":"https://api.github.com/users/OSVR/orgs","repos_url":"https://api.github.com/users/OSVR/repos","events_url":"https://api.github.com/users/OSVR/events{/privacy}","received_events_url":"https://api.github.com/users/OSVR/received_events","type":"Organization","site_admin":false},"repo":{"id":25528375,"name":"OSVR-Core","full_name":"OSVR/OSVR-Core","owner":{"login":"OSVR","id":10343613,"avatar_url":"https://avatars3.githubusercontent.com/u/10343613?v=3","gravatar_id":"","url":"https://api.github.com/users/OSVR","html_url":"https://github.com/OSVR","followers_url":"https://api.github.com/users/OSVR/followers","following_url":"https://api.github.com/users/OSVR/following{/other_user}","gists_url":"https://api.github.com/users/OSVR/gists{/gist_id}","starred_url":"https://api.github.com/users/OSVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSVR/subscriptions","organizations_url":"https://api.github.com/users/OSVR/orgs","repos_url":"https://api.github.com/users/OSVR/repos","events_url":"https://api.github.com/users/OSVR/events{/privacy}","received_events_url":"https://api.github.com/users/OSVR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSVR/OSVR-Core","description":"The core libraries, applications, and plugins of the OSVR software platform.","fork":false,"url":"https://api.github.com/repos/OSVR/OSVR-Core","forks_url":"https://api.github.com/repos/OSVR/OSVR-Core/forks","keys_url":"https://api.github.com/repos/OSVR/OSVR-Core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSVR/OSVR-Core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSVR/OSVR-Core/teams","hooks_url":"https://api.github.com/repos/OSVR/OSVR-Core/hooks","issue_events_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/events{/number}","events_url":"https://api.github.com/repos/OSVR/OSVR-Core/events","assignees_url":"https://api.github.com/repos/OSVR/OSVR-Core/assignees{/user}","branches_url":"https://api.github.com/repos/OSVR/OSVR-Core/branches{/branch}","tags_url":"https://api.github.com/repos/OSVR/OSVR-Core/tags","blobs_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSVR/OSVR-Core/statuses/{sha}","languages_url":"https://api.github.com/repos/OSVR/OSVR-Core/languages","stargazers_url":"https://api.github.com/repos/OSVR/OSVR-Core/stargazers","contributors_url":"https://api.github.com/repos/OSVR/OSVR-Core/contributors","subscribers_url":"https://api.github.com/repos/OSVR/OSVR-Core/subscribers","subscription_url":"https://api.github.com/repos/OSVR/OSVR-Core/subscription","commits_url":"https://api.github.com/repos/OSVR/OSVR-Core/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSVR/OSVR-Core/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Core/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSVR/OSVR-Core/contents/{+path}","compare_url":"https://api.github.com/repos/OSVR/OSVR-Core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSVR/OSVR-Core/merges","archive_url":"https://api.github.com/repos/OSVR/OSVR-Core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSVR/OSVR-Core/downloads","issues_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues{/number}","pulls_url":"https://api.github.com/repos/OSVR/OSVR-Core/pulls{/number}","milestones_url":"https://api.github.com/repos/OSVR/OSVR-Core/milestones{/number}","notifications_url":"https://api.github.com/repos/OSVR/OSVR-Core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSVR/OSVR-Core/labels{/name}","releases_url":"https://api.github.com/repos/OSVR/OSVR-Core/releases{/id}","deployments_url":"https://api.github.com/repos/OSVR/OSVR-Core/deployments","created_at":"2014-10-21T14:56:46Z","updated_at":"2017-05-23T17:20:54Z","pushed_at":"2017-05-25T16:32:29Z","git_url":"git://github.com/OSVR/OSVR-Core.git","ssh_url":"git@github.com:OSVR/OSVR-Core.git","clone_url":"https://github.com/OSVR/OSVR-Core.git","svn_url":"https://github.com/OSVR/OSVR-Core","homepage":"","size":14039,"stargazers_count":250,"watchers_count":250,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":210,"forks":107,"open_issues":210,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258"},"html":{"href":"https://github.com/OSVR/OSVR-Core/pull/258"},"issue":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/issues/258"},"comments":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/OSVR/OSVR-Core/statuses/dcf0aac4671cfc157bf51c65b823b5a0b4d46b5d"}}}}
{"actor":{"display_login":"mars979"}}