{"id":19228011,"url":"https://github.com/kbengine/raycastmesh","last_synced_at":"2025-04-11T00:01:48.144Z","repository":{"id":149854714,"uuid":"54187135","full_name":"kbengine/raycastmesh","owner":"kbengine","description":"Automatically exported from code.google.com/p/raycastmesh","archived":false,"fork":false,"pushed_at":"2016-03-18T08:49:47.000Z","size":1271,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T20:43:00.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbengine.png","metadata":{"files":{"readme":"ReadMe.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-18T08:46:54.000Z","updated_at":"2025-03-04T14:27:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6d10cb8-90d1-44ef-bc96-fb338a9b2d0b","html_url":"https://github.com/kbengine/raycastmesh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbengine%2Fraycastmesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbengine%2Fraycastmesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbengine%2Fraycastmesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbengine%2Fraycastmesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbengine","download_url":"https://codeload.github.com/kbengine/raycastmesh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317705,"owners_count":21083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T15:26:24.058Z","updated_at":"2025-04-11T00:01:48.096Z","avatar_url":"https://github.com/kbengine.png","language":"C++","readme":"\r\nThis code snippet allows you to create an axis aligned\r\nbounding volume tree for a triangle mesh so that you\r\ncan do high-speed raycasting.\r\n\r\nThere are much better implementations of this available\r\non the internet.  In particular I recommend that you use\r\nOPCODE written by Pierre Terdiman.\r\n\r\n@see: http://www.codercorner.com/Opcode.htm\r\n\r\nOPCODE does a whole lot more than just raycasting, and\r\nis a rather significant amount of source code.\r\n\r\nI am providing this code snippet for the use case where\r\nyou *only* want to do quick and dirty optimized raycasting.\r\n\r\nI have not done performance testing between this version\r\nand OPCODE; so I don't know how much slower it is.  However,\r\nanytime you switch to using a spatial data structure for\r\nraycasting, you increase your performance by orders and orders\r\nof magnitude; so this implementation should work fine\r\nfor simple tools and utilities.\r\n\r\nIt also serves as a nice sample for people who are trying\r\nto learn the algorithm of how to implement AABB trees.\r\n\r\nAABB = Axis Aligned Bounding Volume trees.\r\n\r\nhttp://www.cgal.org/Manual/3.5/doc_html/cgal_manual/AABB_tree/Chapter_main.html\r\n\r\n\r\nThis code snippet was written by John W. Ratcliff on August 18, 2011\r\nand released open source under the MIT. license.\r\n\r\nmailto:jratcliffscarab@gmail.com\r\n\r\nThe official source can be found at:  http://code.google.com/p/raycastmesh/\r\n\r\nTo run the demo type:\r\n\r\nRaycastMesh hornbug.obj\r\n\r\nThis will load the Wavefront OBJ file 'deer_bound.obj', then create a 'RaycastMesh'\r\nand then perform one million raycasts against it.\r\n\r\nIt will then write out an image file 'RaycastMesh.png' to demonstrate that the\r\nraycasts all worked correctly.  You can feed it other wavefront OBJ files for testing.\r\n\r\n*** Release note:  June 12, 2012\r\n\r\nI was notified of some bugs with this code and have since fixed them.\r\n\r\nWhen building the AABB some triangles were not being added due to an error in the triangle\r\nbox intersection routine. I did a simpler test and fixed that problem.  Not sure why\r\nthe original triangle/box intersect routine fails; it was copy/paste off the internet.\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbengine%2Fraycastmesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbengine%2Fraycastmesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbengine%2Fraycastmesh/lists"}