{"action":"created","issue":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/2217","repository_url":"https://api.github.com/repos/urho3d/Urho3D","labels_url":"https://api.github.com/repos/urho3d/Urho3D/issues/2217/labels{/name}","comments_url":"https://api.github.com/repos/urho3d/Urho3D/issues/2217/comments","events_url":"https://api.github.com/repos/urho3d/Urho3D/issues/2217/events","html_url":"https://github.com/urho3d/Urho3D/pull/2217","id":284349647,"number":2217,"title":"Expose body_->GetContactList","user":{"login":"cirosantilli-lovechina","id":34806480,"avatar_url":"https://avatars3.githubusercontent.com/u/34806480?v=4","gravatar_id":"","url":"https://api.github.com/users/cirosantilli-lovechina","html_url":"https://github.com/cirosantilli-lovechina","followers_url":"https://api.github.com/users/cirosantilli-lovechina/followers","following_url":"https://api.github.com/users/cirosantilli-lovechina/following{/other_user}","gists_url":"https://api.github.com/users/cirosantilli-lovechina/gists{/gist_id}","starred_url":"https://api.github.com/users/cirosantilli-lovechina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirosantilli-lovechina/subscriptions","organizations_url":"https://api.github.com/users/cirosantilli-lovechina/orgs","repos_url":"https://api.github.com/users/cirosantilli-lovechina/repos","events_url":"https://api.github.com/users/cirosantilli-lovechina/events{/privacy}","received_events_url":"https://api.github.com/users/cirosantilli-lovechina/received_events","type":"User","site_admin":false},"labels":[{"id":59038073,"url":"https://api.github.com/repos/urho3d/Urho3D/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-24T08:11:12Z","updated_at":"2018-03-13T07:38:06Z","closed_at":"2018-02-25T15:27:51Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/urho3d/Urho3D/pulls/2217","html_url":"https://github.com/urho3d/Urho3D/pull/2217","diff_url":"https://github.com/urho3d/Urho3D/pull/2217.diff","patch_url":"https://github.com/urho3d/Urho3D/pull/2217.patch"},"body":"This provides a convenient method to get the list of bodies currently\r\ncolliding with the current body.\r\n\r\nThis is already possible through events, but this method is sometimes\r\nmore convenient.\r\n\r\nSample usage:\r\n\r\n```\r\nVector<std::tuple<Node*, Vector2, Vector<Vector2>>> contactList;\r\nthis->playerBody->GetContactList(contactList);\r\nfor (auto& contact : contactList) {\r\n    Node *node;\r\n    Vector2 normal;\r\n    Vector<Vector2> positions;\r\n    std::tie(node, normal, positions) = contact;\r\n    if (positions.Size() > 0) {\r\n        std::cout << this->steps << std::endl;\r\n        std::cout << \"name: \" << node->GetName().CString() << std::endl;\r\n        std::cout << \"normal: \" << normal.ToString().CString() << std::endl;\r\n        for (auto& position : positions) {\r\n            std::cout << \"position: \" << position.ToString().CString() << std::endl;\r\n        }\r\n        std::cout << std::endl;\r\n    }\r\n}\r\n```\r\n\r\nIf you guys want this, I could clean up the patch further to return a results class instead of tuple, which is more forward portable.\r\n\r\n  "},"comment":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/comments/372573672","html_url":"https://github.com/urho3d/Urho3D/pull/2217#issuecomment-372573672","issue_url":"https://api.github.com/repos/urho3d/Urho3D/issues/2217","id":372573672,"user":{"login":"cirosantilli-lovechina","id":34806480,"avatar_url":"https://avatars3.githubusercontent.com/u/34806480?v=4","gravatar_id":"","url":"https://api.github.com/users/cirosantilli-lovechina","html_url":"https://github.com/cirosantilli-lovechina","followers_url":"https://api.github.com/users/cirosantilli-lovechina/followers","following_url":"https://api.github.com/users/cirosantilli-lovechina/following{/other_user}","gists_url":"https://api.github.com/users/cirosantilli-lovechina/gists{/gist_id}","starred_url":"https://api.github.com/users/cirosantilli-lovechina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cirosantilli-lovechina/subscriptions","organizations_url":"https://api.github.com/users/cirosantilli-lovechina/orgs","repos_url":"https://api.github.com/users/cirosantilli-lovechina/repos","events_url":"https://api.github.com/users/cirosantilli-lovechina/events{/privacy}","received_events_url":"https://api.github.com/users/cirosantilli-lovechina/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T07:38:06Z","updated_at":"2018-03-13T07:38:06Z","author_association":"NONE","body":"@weitjong hi, can you explain why this received wontfix, so I can make better contributions in the future? Thanks."}}
{"actor":{"display_login":"cirosantilli-lovechina"}}