As I create more 3D tools that requires user interaction, its important to be able to handle ray interection on various
shapes that may exist in the 3d scene. So this is a collection of various way to handle rays.
- Plane intersecting a plane that is defined by a point and normal dir.
- Points use a ray to intersect random points in 3d space.
- Segment / Line use a ray to test if it touches line in 3d space
- Triange How to test if a ray hits a single forward facing triangle.
- Quad Test if a ray hits a quad in 3d space.
- Circle How to rest if a ray hits a 2D circle in 3D space.
- Sphere How to test if a ray hits a sphere in 3d space.
- Axis Align Bounding Box (AABB) Test a ray on a 3D cube that does not rotate.
- Oriented Bounding Box (OBB) Testing a ray on a cube that may be rotated without transforming the ray to localspace.
- Capsule Test ray on a combination of an infinate cylinder and spheres.
- Voxel Chunk Test all the voxels a ray goes through in a voxel chunk.
- LocalSpace Transform a ray to local space of an object for testing.
- Mesh Loop through all the triangles of a mesh to test a ray.