industrial-harbor-viewer / node_modules /three-mesh-bvh /src /utils /GeometryRayIntersectUtilities.js
Download node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js from SimWorld-AI/industrial-harbor-viewer: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
- Command line
-
hf download hf://spaces/SimWorld-AI/industrial-harbor-viewer/node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
-
curl -L -o GeometryRayIntersectUtilities.js https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three-mesh-bvh/src/utils/GeometryRayIntersectUtilities.js
406 Bytes
| // converts the given BVH raycast intersection to align with the three.js raycast | |
| // structure (include object, world space distance and point). | |
| export function convertRaycastIntersect( hit, object, raycaster ) { | |
| if ( hit === null ) { | |
| return null; | |
| } | |
| hit.point.applyMatrix4( object.matrixWorld ); | |
| hit.distance = hit.point.distanceTo( raycaster.ray.origin ); | |
| hit.object = object; | |
| return hit; | |
| } | |