{"action":"created","comment":{"url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/comments/77962553","id":77962553,"diff_hunk":"@@ -206,34 +261,48 @@ namespace se3\n           );\n     }\n \n-    /// 2. Update the inner/outer objects\n-    typedef GeometryModel::GeomIndexList GeomIndexList;\n+    /// 2. add the collision pairs between geomModel1 and geomModel2.\n+    for (Index i = 0; i < nGeom1; ++i) {\n+      for (Index j = 0; j < nGeom2; ++j) {\n+        geomModel1.collisionPairs.push_back(CollisionPair(i, nGeom1 + j));\n+      }\n+    }\n+  }\n+\n+  inline void appendGeometryModel(GeometryModel & geomModel1,\n+                                  GeometryData & geomData1,\n+                                  const GeometryModel & geomModel2,\n+                                  const GeometryData & geomData2)\n+  {\n+    /// 1&2. Call previous function.\n+    appendGeometryModel(geomModel1,geomModel2);\n+\n+    /// 3. Update the inner/outer objects\n+    Index nGeom1 = geomModel1.geometryObjects.size();\n+    typedef GeometryData::GeomIndexList GeomIndexList;\n     typedef std::map < JointIndex, GeomIndexList > Map_t;\n-    BOOST_FOREACH(const Map_t::value_type& innerObject, geomModel2.innerObjects)\n+    BOOST_FOREACH(const Map_t::value_type& innerObject, geomData2.innerObjects)\n     {\n-      GeomIndexList& innerGeoms = geomModel1.innerObjects[innerObject.first];\n+      GeomIndexList& innerGeoms = geomData1.innerObjects[innerObject.first];\n       innerGeoms.reserve(innerGeoms.size() + innerObject.second.size());\n       BOOST_FOREACH(const GeomIndex& gid, innerObject.second)\n       {\n         innerGeoms.push_back(nGeom1 + gid);\n       }\n     }\n-    BOOST_FOREACH(const Map_t::value_type& outerObject, geomModel2.outerObjects)\n+    BOOST_FOREACH(const Map_t::value_type& outerObject, geomData2.outerObjects)\n     {\n-      GeomIndexList& outerGeoms = geomModel1.outerObjects[outerObject.first];\n+      GeomIndexList& outerGeoms = geomData1.outerObjects[outerObject.first];\n       outerGeoms.reserve(outerGeoms.size() + outerObject.second.size());\n       BOOST_FOREACH(const GeomIndex& gid, outerObject.second)\n       {\n         outerGeoms.push_back(nGeom1 + gid);\n       }\n     }\n \n-    /// 3. add the collision pairs between geomModel1 and geomModel2.\n-    for (Index i = 0; i < nGeom1; ++i) {\n-      for (Index j = 0; j < nGeom2; ++j) {\n-        geomModel1.collisionPairs.push_back(CollisionPair(i, nGeom1 + j));\n-      }\n-    }\n+    // FIXME: I copy here the previous algo. Maybe it would be safer to simply use the\n+    // fillInnerOuterObjectMaps() method (however marginally less efficient: is it important?).","path":"src/algorithm/geometry.hxx","position":285,"original_position":282,"commit_id":"d5050de827abcd5486f9105bfb531e6c44251cfc","original_commit_id":"ae610919c80f9cddcc1023df7fe29686a975b0c8","user":{"login":"jmirabel","id":2388209,"avatar_url":"https://avatars.githubusercontent.com/u/2388209?v=3","gravatar_id":"","url":"https://api.github.com/users/jmirabel","html_url":"https://github.com/jmirabel","followers_url":"https://api.github.com/users/jmirabel/followers","following_url":"https://api.github.com/users/jmirabel/following{/other_user}","gists_url":"https://api.github.com/users/jmirabel/gists{/gist_id}","starred_url":"https://api.github.com/users/jmirabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmirabel/subscriptions","organizations_url":"https://api.github.com/users/jmirabel/orgs","repos_url":"https://api.github.com/users/jmirabel/repos","events_url":"https://api.github.com/users/jmirabel/events{/privacy}","received_events_url":"https://api.github.com/users/jmirabel/received_events","type":"User","site_admin":false},"body":"I would say it's rather dangerous to keep a function that doesn't do the\njob it's is meant to do. Creating a new data from geomModel1 solves the\nissue, right? If yes, removing is better.\n\nJoseph Mirabel\n\nLe 8 sept. 2016 09:50, \"Nicolas Mansard\" <notifications@github.com> a\nécrit :\n\n> In src/algorithm/geometry.hxx\n> <https://github.com/stack-of-tasks/pinocchio/pull/314#discussion_r77960073>\n> :\n>\n> >        outerGeoms.reserve(outerGeoms.size() + outerObject.second.size());\n> >        BOOST_FOREACH(const GeomIndex& gid, outerObject.second)\n> >        {\n> >          outerGeoms.push_back(nGeom1 + gid);\n> >        }\n> >      }\n> >\n> > -    /// 3. add the collision pairs between geomModel1 and geomModel2.\n> > -    for (Index i = 0; i < nGeom1; ++i) {\n> > -      for (Index j = 0; j < nGeom2; ++j) {\n> > -        geomModel1.collisionPairs.push_back(CollisionPair(i, nGeom1 + j));\n> > -      }\n> > -    }\n> > +    // FIXME: I copy here the previous algo. Maybe it would be safer to simply use the\n> > +    // fillInnerOuterObjectMaps() method (however marginally less efficient: is it important?).\n>\n> Should I simply remove this second function?\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/stack-of-tasks/pinocchio/pull/314/files/ae610919c80f9cddcc1023df7fe29686a975b0c8#r77960073>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ACRw8R-K3qzfp99VqsBNFRywqFkXjjwSks5qn75MgaJpZM4J23-P>\n> .\n>\n","created_at":"2016-09-08T08:11:52Z","updated_at":"2016-09-08T08:11:52Z","html_url":"https://github.com/stack-of-tasks/pinocchio/pull/314#discussion_r77962553","pull_request_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314","_links":{"self":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/comments/77962553"},"html":{"href":"https://github.com/stack-of-tasks/pinocchio/pull/314#discussion_r77962553"},"pull_request":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314"}}},"pull_request":{"url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314","id":84292586,"html_url":"https://github.com/stack-of-tasks/pinocchio/pull/314","diff_url":"https://github.com/stack-of-tasks/pinocchio/pull/314.diff","patch_url":"https://github.com/stack-of-tasks/pinocchio/pull/314.patch","issue_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/314","number":314,"state":"open","locked":false,"title":"Refactorize geometry module","user":{"login":"nmansard","id":458248,"avatar_url":"https://avatars.githubusercontent.com/u/458248?v=3","gravatar_id":"","url":"https://api.github.com/users/nmansard","html_url":"https://github.com/nmansard","followers_url":"https://api.github.com/users/nmansard/followers","following_url":"https://api.github.com/users/nmansard/following{/other_user}","gists_url":"https://api.github.com/users/nmansard/gists{/gist_id}","starred_url":"https://api.github.com/users/nmansard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmansard/subscriptions","organizations_url":"https://api.github.com/users/nmansard/orgs","repos_url":"https://api.github.com/users/nmansard/repos","events_url":"https://api.github.com/users/nmansard/events{/privacy}","received_events_url":"https://api.github.com/users/nmansard/received_events","type":"User","site_admin":false},"body":"Follow #281 ","created_at":"2016-09-07T12:40:56Z","updated_at":"2016-09-08T08:11:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c710a56228f0d6b5ddc5bca08fd6c6fd2609ad21","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/stack-of-tasks/pinocchio/milestones/3","html_url":"https://github.com/stack-of-tasks/pinocchio/milestones/HPP%20refactoring","labels_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/milestones/3/labels","id":1855639,"number":3,"title":"HPP refactoring","description":"Fusion of Pinocchio with HPP.","creator":{"login":"jcarpent","id":1567317,"avatar_url":"https://avatars.githubusercontent.com/u/1567317?v=3","gravatar_id":"","url":"https://api.github.com/users/jcarpent","html_url":"https://github.com/jcarpent","followers_url":"https://api.github.com/users/jcarpent/followers","following_url":"https://api.github.com/users/jcarpent/following{/other_user}","gists_url":"https://api.github.com/users/jcarpent/gists{/gist_id}","starred_url":"https://api.github.com/users/jcarpent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcarpent/subscriptions","organizations_url":"https://api.github.com/users/jcarpent/orgs","repos_url":"https://api.github.com/users/jcarpent/repos","events_url":"https://api.github.com/users/jcarpent/events{/privacy}","received_events_url":"https://api.github.com/users/jcarpent/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":39,"state":"open","created_at":"2016-06-29T17:23:22Z","updated_at":"2016-09-07T13:56:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314/commits","review_comments_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314/comments","review_comment_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/314/comments","statuses_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/statuses/d5050de827abcd5486f9105bfb531e6c44251cfc","head":{"label":"nmansard:topic/refacgeom","ref":"topic/refacgeom","sha":"d5050de827abcd5486f9105bfb531e6c44251cfc","user":{"login":"nmansard","id":458248,"avatar_url":"https://avatars.githubusercontent.com/u/458248?v=3","gravatar_id":"","url":"https://api.github.com/users/nmansard","html_url":"https://github.com/nmansard","followers_url":"https://api.github.com/users/nmansard/followers","following_url":"https://api.github.com/users/nmansard/following{/other_user}","gists_url":"https://api.github.com/users/nmansard/gists{/gist_id}","starred_url":"https://api.github.com/users/nmansard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmansard/subscriptions","organizations_url":"https://api.github.com/users/nmansard/orgs","repos_url":"https://api.github.com/users/nmansard/repos","events_url":"https://api.github.com/users/nmansard/events{/privacy}","received_events_url":"https://api.github.com/users/nmansard/received_events","type":"User","site_admin":false},"repo":{"id":31133508,"name":"pinocchio","full_name":"nmansard/pinocchio","owner":{"login":"nmansard","id":458248,"avatar_url":"https://avatars.githubusercontent.com/u/458248?v=3","gravatar_id":"","url":"https://api.github.com/users/nmansard","html_url":"https://github.com/nmansard","followers_url":"https://api.github.com/users/nmansard/followers","following_url":"https://api.github.com/users/nmansard/following{/other_user}","gists_url":"https://api.github.com/users/nmansard/gists{/gist_id}","starred_url":"https://api.github.com/users/nmansard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmansard/subscriptions","organizations_url":"https://api.github.com/users/nmansard/orgs","repos_url":"https://api.github.com/users/nmansard/repos","events_url":"https://api.github.com/users/nmansard/events{/privacy}","received_events_url":"https://api.github.com/users/nmansard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nmansard/pinocchio","description":"Dynamic computations using Spatial Algebra","fork":true,"url":"https://api.github.com/repos/nmansard/pinocchio","forks_url":"https://api.github.com/repos/nmansard/pinocchio/forks","keys_url":"https://api.github.com/repos/nmansard/pinocchio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nmansard/pinocchio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nmansard/pinocchio/teams","hooks_url":"https://api.github.com/repos/nmansard/pinocchio/hooks","issue_events_url":"https://api.github.com/repos/nmansard/pinocchio/issues/events{/number}","events_url":"https://api.github.com/repos/nmansard/pinocchio/events","assignees_url":"https://api.github.com/repos/nmansard/pinocchio/assignees{/user}","branches_url":"https://api.github.com/repos/nmansard/pinocchio/branches{/branch}","tags_url":"https://api.github.com/repos/nmansard/pinocchio/tags","blobs_url":"https://api.github.com/repos/nmansard/pinocchio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nmansard/pinocchio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nmansard/pinocchio/git/refs{/sha}","trees_url":"https://api.github.com/repos/nmansard/pinocchio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nmansard/pinocchio/statuses/{sha}","languages_url":"https://api.github.com/repos/nmansard/pinocchio/languages","stargazers_url":"https://api.github.com/repos/nmansard/pinocchio/stargazers","contributors_url":"https://api.github.com/repos/nmansard/pinocchio/contributors","subscribers_url":"https://api.github.com/repos/nmansard/pinocchio/subscribers","subscription_url":"https://api.github.com/repos/nmansard/pinocchio/subscription","commits_url":"https://api.github.com/repos/nmansard/pinocchio/commits{/sha}","git_commits_url":"https://api.github.com/repos/nmansard/pinocchio/git/commits{/sha}","comments_url":"https://api.github.com/repos/nmansard/pinocchio/comments{/number}","issue_comment_url":"https://api.github.com/repos/nmansard/pinocchio/issues/comments{/number}","contents_url":"https://api.github.com/repos/nmansard/pinocchio/contents/{+path}","compare_url":"https://api.github.com/repos/nmansard/pinocchio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nmansard/pinocchio/merges","archive_url":"https://api.github.com/repos/nmansard/pinocchio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nmansard/pinocchio/downloads","issues_url":"https://api.github.com/repos/nmansard/pinocchio/issues{/number}","pulls_url":"https://api.github.com/repos/nmansard/pinocchio/pulls{/number}","milestones_url":"https://api.github.com/repos/nmansard/pinocchio/milestones{/number}","notifications_url":"https://api.github.com/repos/nmansard/pinocchio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nmansard/pinocchio/labels{/name}","releases_url":"https://api.github.com/repos/nmansard/pinocchio/releases{/id}","deployments_url":"https://api.github.com/repos/nmansard/pinocchio/deployments","created_at":"2015-02-21T17:25:35Z","updated_at":"2015-09-18T13:58:26Z","pushed_at":"2016-09-08T08:09:08Z","git_url":"git://github.com/nmansard/pinocchio.git","ssh_url":"git@github.com:nmansard/pinocchio.git","clone_url":"https://github.com/nmansard/pinocchio.git","svn_url":"https://github.com/nmansard/pinocchio","homepage":null,"size":6086,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"stack-of-tasks:hpp-devel","ref":"hpp-devel","sha":"7b5c7040f3367ae25ee86665925809113a960b11","user":{"login":"stack-of-tasks","id":3725101,"avatar_url":"https://avatars.githubusercontent.com/u/3725101?v=3","gravatar_id":"","url":"https://api.github.com/users/stack-of-tasks","html_url":"https://github.com/stack-of-tasks","followers_url":"https://api.github.com/users/stack-of-tasks/followers","following_url":"https://api.github.com/users/stack-of-tasks/following{/other_user}","gists_url":"https://api.github.com/users/stack-of-tasks/gists{/gist_id}","starred_url":"https://api.github.com/users/stack-of-tasks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stack-of-tasks/subscriptions","organizations_url":"https://api.github.com/users/stack-of-tasks/orgs","repos_url":"https://api.github.com/users/stack-of-tasks/repos","events_url":"https://api.github.com/users/stack-of-tasks/events{/privacy}","received_events_url":"https://api.github.com/users/stack-of-tasks/received_events","type":"Organization","site_admin":false},"repo":{"id":24897645,"name":"pinocchio","full_name":"stack-of-tasks/pinocchio","owner":{"login":"stack-of-tasks","id":3725101,"avatar_url":"https://avatars.githubusercontent.com/u/3725101?v=3","gravatar_id":"","url":"https://api.github.com/users/stack-of-tasks","html_url":"https://github.com/stack-of-tasks","followers_url":"https://api.github.com/users/stack-of-tasks/followers","following_url":"https://api.github.com/users/stack-of-tasks/following{/other_user}","gists_url":"https://api.github.com/users/stack-of-tasks/gists{/gist_id}","starred_url":"https://api.github.com/users/stack-of-tasks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stack-of-tasks/subscriptions","organizations_url":"https://api.github.com/users/stack-of-tasks/orgs","repos_url":"https://api.github.com/users/stack-of-tasks/repos","events_url":"https://api.github.com/users/stack-of-tasks/events{/privacy}","received_events_url":"https://api.github.com/users/stack-of-tasks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stack-of-tasks/pinocchio","description":"Dynamic computations using Spatial Algebra","fork":false,"url":"https://api.github.com/repos/stack-of-tasks/pinocchio","forks_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/forks","keys_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/teams","hooks_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/hooks","issue_events_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/events{/number}","events_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/events","assignees_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/assignees{/user}","branches_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/branches{/branch}","tags_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/tags","blobs_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/git/refs{/sha}","trees_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/statuses/{sha}","languages_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/languages","stargazers_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/stargazers","contributors_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/contributors","subscribers_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/subscribers","subscription_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/subscription","commits_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/commits{/sha}","git_commits_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/git/commits{/sha}","comments_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/comments{/number}","issue_comment_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/comments{/number}","contents_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/contents/{+path}","compare_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/merges","archive_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/downloads","issues_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues{/number}","pulls_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls{/number}","milestones_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/milestones{/number}","notifications_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/labels{/name}","releases_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/releases{/id}","deployments_url":"https://api.github.com/repos/stack-of-tasks/pinocchio/deployments","created_at":"2014-10-07T15:42:51Z","updated_at":"2016-07-27T11:22:57Z","pushed_at":"2016-09-08T08:09:09Z","git_url":"git://github.com/stack-of-tasks/pinocchio.git","ssh_url":"git@github.com:stack-of-tasks/pinocchio.git","clone_url":"https://github.com/stack-of-tasks/pinocchio.git","svn_url":"https://github.com/stack-of-tasks/pinocchio","homepage":"http://stack-of-tasks.github.io/pinocchio/","size":8109,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":37,"forks":15,"open_issues":37,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314"},"html":{"href":"https://github.com/stack-of-tasks/pinocchio/pull/314"},"issue":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/314"},"comments":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/stack-of-tasks/pinocchio/statuses/d5050de827abcd5486f9105bfb531e6c44251cfc"}}}}
{"actor":{"display_login":"jmirabel"}}