{"action":"created","comment":{"url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/comments/26032282","id":26032282,"diff_hunk":"@@ -9,171 +9,26 @@\n #include <stdexcept>\n #include <bitset>\n \n-#include <stdint.h>\n+#include \"Geometry.h\"\n+#include \"PointPair.h\"\n+#include \"Element.h\"\n+#include \"Model.h\"\n \n-#undef DLLEXPORT\n-#if defined(WIN32) || defined(WIN64)\n-  #if defined(drakeCollision_EXPORTS)\n-    #define DLLEXPORT __declspec( dllexport )\n-  #else\n-    #define DLLEXPORT __declspec( dllimport )\n-  #endif\n-#else\n-    #define DLLEXPORT\n-#endif\n+#include \"DLLEXPORT_drakeCollision.h\"\n \n+static const int MAX_NUM_COLLISION_FILTER_GROUPS = 128;\n \n namespace DrakeCollision\n {\n-  enum DLLEXPORT Shape {\n-    UNKNOWN,\n-    BOX,\n-    SPHERE,\n-    CYLINDER,\n-    MESH,\n-    CAPSULE\n-  };\n-\n-  enum DLLEXPORT ModelType {\n-    NONE,\n-    AUTO,\n-    BULLET\n-  };\n-\n-  class DLLEXPORT Model {\n-  public:\n-    virtual void resize(int num_bodies) {};\n-    \n-    virtual void addElement(const int body_idx, const int parent_idx, \n-\t\t\t    const Eigen::Matrix4d& T_element_to_link, Shape shape, \n-\t\t\t    const std::vector<double>& params, \n-          const std::string& group_name,\n-\t\t\t    bool is_static,\n-          bool use_margins = true) {};\n-\n-    virtual bool updateElementsForBody(const int body_idx, \n-\t\t\t\t       const Eigen::Matrix4d& T_link_to_world) { return false; };\n-      \n-    virtual bool setCollisionFilter(const int body_idx, const uint16_t group, \n-\t\t\t\t    const uint16_t mask) { return false; };\n-\n-    virtual bool getPointCollision(const int body_idx, \n-\t\t\t\t   const int body_collision_idx, \n-\t\t\t\t   Eigen::Vector3d &ptA, Eigen::Vector3d &ptB, \n-\t\t\t\t   Eigen::Vector3d &normal) { return false; };\n-\n-    virtual bool getPairwiseCollision(const int bodyA_idx, const int bodyB_idx, \n-\t\t\t\t      Eigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB, \n-\t\t\t\t      Eigen::MatrixXd& normals) { return false; };\n-\n-    virtual bool getPairwisePointCollision(const int bodyA_idx, const int bodyB_idx, \n-\t\t\t\t\t   const int body_collisionA_idx, \n-\t\t\t\t\t   Eigen::Vector3d &ptA, Eigen::Vector3d &ptB, \n-\t\t\t\t\t   Eigen::Vector3d &normal) { return false; };\n-\n-    virtual bool getClosestPoints(const int bodyA_idx, const int bodyB_idx,\n-\t\t\t\t  Eigen::Vector3d& ptA, Eigen::Vector3d& ptB, Eigen::Vector3d& normal,\n-\t\t\t\t  double& distance) { return false; };\n-\n-    virtual bool closestPointsAllBodies(std::vector<int>& bodyA_idx, \n-\t\t\t\t\tstd::vector<int>& bodyB_idx, \n-\t\t\t\t\tEigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB,\n-\t\t\t\t\tEigen::MatrixXd& normal, \n-\t\t\t\t\tEigen::VectorXd& distance,\n-\t\t\t\t\tconst std::vector<int>& bodies_idx,\n-          const std::set<std::string>& active_element_groups) { return false; };\n-\n-    bool closestPointsAllBodies(std::vector<int>& bodyA_idx, \n-        std::vector<int>& bodyB_idx, \n-        Eigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB,\n-        Eigen::MatrixXd& normal, \n-        Eigen::VectorXd& distance,\n-        const std::set<std::string>& active_element_groups);\n-\n-    bool closestPointsAllBodies(std::vector<int>& bodyA_idx, \n-        std::vector<int>& bodyB_idx, \n-        Eigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB,\n-        Eigen::MatrixXd& normal, \n-        Eigen::VectorXd& distance,\n-        const std::vector<int>& bodies_idx);\n \n-    bool closestPointsAllBodies(std::vector<int>& bodyA_idx, \n-        std::vector<int>& bodyB_idx, \n-        Eigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB,\n-        Eigen::MatrixXd& normal, \n-        Eigen::VectorXd& distance);\n+  DLLEXPORT_drakeCollision std::unique_ptr<Model> newModel();\n \n-    virtual bool allCollisions(std::vector<int>& bodyA_idx, \n-\t\t\t       std::vector<int>& bodyB_idx, \n-\t\t\t       Eigen::MatrixXd& ptsA, Eigen::MatrixXd& ptsB) { return false; };\n-                                  \n-    //\n-    // Performs raycasting collision detecting (like a LIDAR / laser rangefinder)\n-    //\n-    // @param origin Vector3d specifying the position of the ray's origin\n-    // @param ray_endpoint Vector3d specifying a second point on the ray in world coordinates\n-    // @param distance to the first collision, or -1 on no collision\n-    //\n-    virtual bool collisionRaycast(const Eigen::Matrix3Xd &origin, const Eigen::Matrix3Xd &ray_endpoint, Eigen::VectorXd &distances) { return false; };\n+  typedef std::bitset<MAX_NUM_COLLISION_FILTER_GROUPS> bitmask;\n \n-    protected:\n-      virtual const std::vector<int> bodyIndices() const;\n-      virtual const std::set<std::string> elementGroupNames() const;\n-  };\n-\n-  DLLEXPORT std::shared_ptr<Model> newModel();","path":"systems/plants/collision/DrakeCollision.h","position":124,"original_position":124,"commit_id":"51b7236cb9b416f787b36e18c78f15d4cd1b028e","original_commit_id":"51b7236cb9b416f787b36e18c78f15d4cd1b028e","user":{"login":"avalenzu","id":2574034,"avatar_url":"https://avatars.githubusercontent.com/u/2574034?v=3","gravatar_id":"","url":"https://api.github.com/users/avalenzu","html_url":"https://github.com/avalenzu","followers_url":"https://api.github.com/users/avalenzu/followers","following_url":"https://api.github.com/users/avalenzu/following{/other_user}","gists_url":"https://api.github.com/users/avalenzu/gists{/gist_id}","starred_url":"https://api.github.com/users/avalenzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avalenzu/subscriptions","organizations_url":"https://api.github.com/users/avalenzu/orgs","repos_url":"https://api.github.com/users/avalenzu/repos","events_url":"https://api.github.com/users/avalenzu/events{/privacy}","received_events_url":"https://api.github.com/users/avalenzu/received_events","type":"User","site_admin":false},"body":"On second look, this is fine - those lines with the wrong DLLEXPORT are being removed by the diff, not added.","created_at":"2015-03-09T12:47:01Z","updated_at":"2015-03-09T12:47:01Z","html_url":"https://github.com/RobotLocomotion/drake/pull/824#discussion_r26032282","pull_request_url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824","_links":{"self":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/comments/26032282"},"html":{"href":"https://github.com/RobotLocomotion/drake/pull/824#discussion_r26032282"},"pull_request":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824"}}},"pull_request":{"url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824","id":30393149,"html_url":"https://github.com/RobotLocomotion/drake/pull/824","diff_url":"https://github.com/RobotLocomotion/drake/pull/824.diff","patch_url":"https://github.com/RobotLocomotion/drake/pull/824.patch","issue_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/824","number":824,"state":"open","locked":false,"title":"Refactor drakeCollision C++ library","user":{"login":"avalenzu","id":2574034,"avatar_url":"https://avatars.githubusercontent.com/u/2574034?v=3","gravatar_id":"","url":"https://api.github.com/users/avalenzu","html_url":"https://github.com/avalenzu","followers_url":"https://api.github.com/users/avalenzu/followers","following_url":"https://api.github.com/users/avalenzu/following{/other_user}","gists_url":"https://api.github.com/users/avalenzu/gists{/gist_id}","starred_url":"https://api.github.com/users/avalenzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avalenzu/subscriptions","organizations_url":"https://api.github.com/users/avalenzu/orgs","repos_url":"https://api.github.com/users/avalenzu/repos","events_url":"https://api.github.com/users/avalenzu/events{/privacy}","received_events_url":"https://api.github.com/users/avalenzu/received_events","type":"User","site_admin":false},"body":"* Removes dependence on body indices from drakeCollision, which allows collision\r\n  elements to be created during parsing of a URDF, rather than during RBM\r\n  compilation.\r\n* Removes old tests that used boost's unit test framework\r\n* Provides better separation between RBM and drakeCollision -\r\n  drakeCollision could now be used purely geometric collision detection between collision elements without an RBM or a notion of rigid bodies that contain collision elements.\r\n* Moves the margin/no_margin split into the BulletModel class - RBM no longer\r\n  contains two collision models.\r\n\r\nThis pull request does not re-implement loading of obj files for mesh objects, and does not remove URDFRigidBodyManipulator.","created_at":"2015-03-03T17:16:07Z","updated_at":"2015-03-09T12:47:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8165cb9ee4ad4d9c0592aaa2c4a7ff52c41c75b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824/commits","review_comments_url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824/comments","review_comment_url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/824/comments","statuses_url":"https://api.github.com/repos/RobotLocomotion/drake/statuses/51b7236cb9b416f787b36e18c78f15d4cd1b028e","head":{"label":"avalenzu:akv-collision-refactoring","ref":"akv-collision-refactoring","sha":"51b7236cb9b416f787b36e18c78f15d4cd1b028e","user":{"login":"avalenzu","id":2574034,"avatar_url":"https://avatars.githubusercontent.com/u/2574034?v=3","gravatar_id":"","url":"https://api.github.com/users/avalenzu","html_url":"https://github.com/avalenzu","followers_url":"https://api.github.com/users/avalenzu/followers","following_url":"https://api.github.com/users/avalenzu/following{/other_user}","gists_url":"https://api.github.com/users/avalenzu/gists{/gist_id}","starred_url":"https://api.github.com/users/avalenzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avalenzu/subscriptions","organizations_url":"https://api.github.com/users/avalenzu/orgs","repos_url":"https://api.github.com/users/avalenzu/repos","events_url":"https://api.github.com/users/avalenzu/events{/privacy}","received_events_url":"https://api.github.com/users/avalenzu/received_events","type":"User","site_admin":false},"repo":{"id":16259647,"name":"drake","full_name":"avalenzu/drake","owner":{"login":"avalenzu","id":2574034,"avatar_url":"https://avatars.githubusercontent.com/u/2574034?v=3","gravatar_id":"","url":"https://api.github.com/users/avalenzu","html_url":"https://github.com/avalenzu","followers_url":"https://api.github.com/users/avalenzu/followers","following_url":"https://api.github.com/users/avalenzu/following{/other_user}","gists_url":"https://api.github.com/users/avalenzu/gists{/gist_id}","starred_url":"https://api.github.com/users/avalenzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avalenzu/subscriptions","organizations_url":"https://api.github.com/users/avalenzu/orgs","repos_url":"https://api.github.com/users/avalenzu/repos","events_url":"https://api.github.com/users/avalenzu/events{/privacy}","received_events_url":"https://api.github.com/users/avalenzu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avalenzu/drake","description":"A planning, control, and analysis toolbox for nonlinear dynamical systems.  Please see the WIKI for documentation.","fork":true,"url":"https://api.github.com/repos/avalenzu/drake","forks_url":"https://api.github.com/repos/avalenzu/drake/forks","keys_url":"https://api.github.com/repos/avalenzu/drake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avalenzu/drake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avalenzu/drake/teams","hooks_url":"https://api.github.com/repos/avalenzu/drake/hooks","issue_events_url":"https://api.github.com/repos/avalenzu/drake/issues/events{/number}","events_url":"https://api.github.com/repos/avalenzu/drake/events","assignees_url":"https://api.github.com/repos/avalenzu/drake/assignees{/user}","branches_url":"https://api.github.com/repos/avalenzu/drake/branches{/branch}","tags_url":"https://api.github.com/repos/avalenzu/drake/tags","blobs_url":"https://api.github.com/repos/avalenzu/drake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avalenzu/drake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avalenzu/drake/git/refs{/sha}","trees_url":"https://api.github.com/repos/avalenzu/drake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avalenzu/drake/statuses/{sha}","languages_url":"https://api.github.com/repos/avalenzu/drake/languages","stargazers_url":"https://api.github.com/repos/avalenzu/drake/stargazers","contributors_url":"https://api.github.com/repos/avalenzu/drake/contributors","subscribers_url":"https://api.github.com/repos/avalenzu/drake/subscribers","subscription_url":"https://api.github.com/repos/avalenzu/drake/subscription","commits_url":"https://api.github.com/repos/avalenzu/drake/commits{/sha}","git_commits_url":"https://api.github.com/repos/avalenzu/drake/git/commits{/sha}","comments_url":"https://api.github.com/repos/avalenzu/drake/comments{/number}","issue_comment_url":"https://api.github.com/repos/avalenzu/drake/issues/comments{/number}","contents_url":"https://api.github.com/repos/avalenzu/drake/contents/{+path}","compare_url":"https://api.github.com/repos/avalenzu/drake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avalenzu/drake/merges","archive_url":"https://api.github.com/repos/avalenzu/drake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avalenzu/drake/downloads","issues_url":"https://api.github.com/repos/avalenzu/drake/issues{/number}","pulls_url":"https://api.github.com/repos/avalenzu/drake/pulls{/number}","milestones_url":"https://api.github.com/repos/avalenzu/drake/milestones{/number}","notifications_url":"https://api.github.com/repos/avalenzu/drake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avalenzu/drake/labels{/name}","releases_url":"https://api.github.com/repos/avalenzu/drake/releases{/id}","created_at":"2014-01-26T19:16:04Z","updated_at":"2014-12-23T14:26:56Z","pushed_at":"2015-03-06T01:59:02Z","git_url":"git://github.com/avalenzu/drake.git","ssh_url":"git@github.com:avalenzu/drake.git","clone_url":"https://github.com/avalenzu/drake.git","svn_url":"https://github.com/avalenzu/drake","homepage":"https://github.com/RobotLocomotion/drake/wiki","size":441211,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":true,"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":"RobotLocomotion:master","ref":"master","sha":"b6a0f07d13f83d3cadbc88d5479516ab52a42d49","user":{"login":"RobotLocomotion","id":6496345,"avatar_url":"https://avatars.githubusercontent.com/u/6496345?v=3","gravatar_id":"","url":"https://api.github.com/users/RobotLocomotion","html_url":"https://github.com/RobotLocomotion","followers_url":"https://api.github.com/users/RobotLocomotion/followers","following_url":"https://api.github.com/users/RobotLocomotion/following{/other_user}","gists_url":"https://api.github.com/users/RobotLocomotion/gists{/gist_id}","starred_url":"https://api.github.com/users/RobotLocomotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobotLocomotion/subscriptions","organizations_url":"https://api.github.com/users/RobotLocomotion/orgs","repos_url":"https://api.github.com/users/RobotLocomotion/repos","events_url":"https://api.github.com/users/RobotLocomotion/events{/privacy}","received_events_url":"https://api.github.com/users/RobotLocomotion/received_events","type":"Organization","site_admin":false},"repo":{"id":16256144,"name":"drake","full_name":"RobotLocomotion/drake","owner":{"login":"RobotLocomotion","id":6496345,"avatar_url":"https://avatars.githubusercontent.com/u/6496345?v=3","gravatar_id":"","url":"https://api.github.com/users/RobotLocomotion","html_url":"https://github.com/RobotLocomotion","followers_url":"https://api.github.com/users/RobotLocomotion/followers","following_url":"https://api.github.com/users/RobotLocomotion/following{/other_user}","gists_url":"https://api.github.com/users/RobotLocomotion/gists{/gist_id}","starred_url":"https://api.github.com/users/RobotLocomotion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobotLocomotion/subscriptions","organizations_url":"https://api.github.com/users/RobotLocomotion/orgs","repos_url":"https://api.github.com/users/RobotLocomotion/repos","events_url":"https://api.github.com/users/RobotLocomotion/events{/privacy}","received_events_url":"https://api.github.com/users/RobotLocomotion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RobotLocomotion/drake","description":"A planning, control, and analysis toolbox for nonlinear dynamical systems.  Please see the WIKI for documentation.","fork":false,"url":"https://api.github.com/repos/RobotLocomotion/drake","forks_url":"https://api.github.com/repos/RobotLocomotion/drake/forks","keys_url":"https://api.github.com/repos/RobotLocomotion/drake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RobotLocomotion/drake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RobotLocomotion/drake/teams","hooks_url":"https://api.github.com/repos/RobotLocomotion/drake/hooks","issue_events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/events{/number}","events_url":"https://api.github.com/repos/RobotLocomotion/drake/events","assignees_url":"https://api.github.com/repos/RobotLocomotion/drake/assignees{/user}","branches_url":"https://api.github.com/repos/RobotLocomotion/drake/branches{/branch}","tags_url":"https://api.github.com/repos/RobotLocomotion/drake/tags","blobs_url":"https://api.github.com/repos/RobotLocomotion/drake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RobotLocomotion/drake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RobotLocomotion/drake/git/refs{/sha}","trees_url":"https://api.github.com/repos/RobotLocomotion/drake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RobotLocomotion/drake/statuses/{sha}","languages_url":"https://api.github.com/repos/RobotLocomotion/drake/languages","stargazers_url":"https://api.github.com/repos/RobotLocomotion/drake/stargazers","contributors_url":"https://api.github.com/repos/RobotLocomotion/drake/contributors","subscribers_url":"https://api.github.com/repos/RobotLocomotion/drake/subscribers","subscription_url":"https://api.github.com/repos/RobotLocomotion/drake/subscription","commits_url":"https://api.github.com/repos/RobotLocomotion/drake/commits{/sha}","git_commits_url":"https://api.github.com/repos/RobotLocomotion/drake/git/commits{/sha}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/comments{/number}","issue_comment_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/comments{/number}","contents_url":"https://api.github.com/repos/RobotLocomotion/drake/contents/{+path}","compare_url":"https://api.github.com/repos/RobotLocomotion/drake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RobotLocomotion/drake/merges","archive_url":"https://api.github.com/repos/RobotLocomotion/drake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RobotLocomotion/drake/downloads","issues_url":"https://api.github.com/repos/RobotLocomotion/drake/issues{/number}","pulls_url":"https://api.github.com/repos/RobotLocomotion/drake/pulls{/number}","milestones_url":"https://api.github.com/repos/RobotLocomotion/drake/milestones{/number}","notifications_url":"https://api.github.com/repos/RobotLocomotion/drake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/labels{/name}","releases_url":"https://api.github.com/repos/RobotLocomotion/drake/releases{/id}","created_at":"2014-01-26T16:11:05Z","updated_at":"2015-03-09T12:41:39Z","pushed_at":"2015-03-09T12:41:38Z","git_url":"git://github.com/RobotLocomotion/drake.git","ssh_url":"git@github.com:RobotLocomotion/drake.git","clone_url":"https://github.com/RobotLocomotion/drake.git","svn_url":"https://github.com/RobotLocomotion/drake","homepage":"https://github.com/RobotLocomotion/drake/wiki","size":170476,"stargazers_count":92,"watchers_count":92,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":98,"forks":88,"open_issues":98,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824"},"html":{"href":"https://github.com/RobotLocomotion/drake/pull/824"},"issue":{"href":"https://api.github.com/repos/RobotLocomotion/drake/issues/824"},"comments":{"href":"https://api.github.com/repos/RobotLocomotion/drake/issues/824/comments"},"review_comments":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824/comments"},"review_comment":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RobotLocomotion/drake/pulls/824/commits"},"statuses":{"href":"https://api.github.com/repos/RobotLocomotion/drake/statuses/51b7236cb9b416f787b36e18c78f15d4cd1b028e"}}}}