{"action":"opened","issue":{"url":"https://api.github.com/repos/schteppe/cannon.js/issues/231","labels_url":"https://api.github.com/repos/schteppe/cannon.js/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/schteppe/cannon.js/issues/231/comments","events_url":"https://api.github.com/repos/schteppe/cannon.js/issues/231/events","html_url":"https://github.com/schteppe/cannon.js/issues/231","id":107396370,"number":231,"title":"Missing intersects and Math tools","user":{"login":"Tezirg","id":10632501,"avatar_url":"https://avatars.githubusercontent.com/u/10632501?v=3","gravatar_id":"","url":"https://api.github.com/users/Tezirg","html_url":"https://github.com/Tezirg","followers_url":"https://api.github.com/users/Tezirg/followers","following_url":"https://api.github.com/users/Tezirg/following{/other_user}","gists_url":"https://api.github.com/users/Tezirg/gists{/gist_id}","starred_url":"https://api.github.com/users/Tezirg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tezirg/subscriptions","organizations_url":"https://api.github.com/users/Tezirg/orgs","repos_url":"https://api.github.com/users/Tezirg/repos","events_url":"https://api.github.com/users/Tezirg/events{/privacy}","received_events_url":"https://api.github.com/users/Tezirg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-20T14:54:18Z","updated_at":"2015-09-20T14:54:18Z","closed_at":null,"body":"Hello, here we are on the best js library and functionalities are missing ! \r\nIt is unfortunate that meshes cannot intersect each other or even with boxes.\r\nI read a bit on this part, and in fact cannon.js is missing two functions : \r\n'''\r\nNarrowphase.prototype[Shape.types.CONVEXPOLYHEDRON | Shape.typesTRIMESH]\r\nNarrowphase.prototype[Shape.types.TRIMESH]\r\n'''\r\nsince [box|cylinder/trimesh] intersects can be impemented as follow\r\n'''\r\nNarrowphase.prototype[Shape.types.BOX | Shape.types.TRIMESH] =\r\nNarrowphase.prototype.boxConvex = function(si,sj,xi,xj,qi,qj,bi,bj){\r\n    si.convexPolyhedronRepresentation.material = si.material;\r\n    si.convexPolyhedronRepresentation.collisionResponse = si.collisionResponse;\r\n    this.convexTrimesh(si.convexPolyhedronRepresentation,sj,xi,xj,qi,qj,bi,bj,si,sj);\r\n};\r\n'''\r\n\r\nFirst, can you confirm that i'm right ? Then, I'd like to help you with that but i'm missing Math tools\r\nsuch as Ray, Plane(ax+by+cz+d = 0) and Triangle.\r\nIs also missing Vector2 / Vector4 / Mat2 / Mat4. (Maybe we should make all of them with SIMD. Have a look at https://github.com/google/vector_math.dart)\r\n\r\nThanks a lot for analysing this issue and for this awsome lib ! \r\nTezirg"}}