skip to content
[readonly]

programs/pathtrace's nearest hit of a ray against a scene's quads, spheres and bounded triangle mesh (template over a float's ops)

sh
$ sexc add @ajax/pathtrace-intersect
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 01:59v/# 1 version
  • drwxr-xr-x-Oct 27 01:59files/# the files of 0.1.0
latest
0.1.0, published Oct 27 01:59 by ajax
owners
ajax
license
MIT
dependencies
@ajax/pathtrace-math ^0.1.0, @ajax/pathtrace-scene ^0.1.0
dependents
@ajax/pathtrace-sample, @ajax/pathtrace-tile
keywords
alphaos mesh pathtrace ray intersection template
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/pathtrace-intersect
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/pathtrace-intersect
2
3The nearest hit of a ray in (EPS, tmax) against a scene's quads, spheres and triangles, with the triangle
4mesh skipped unless its bounding sphere is hit: `pt_intersect<suffix>(sc, &layout, o, d, tmax, &id)`
5returns t and the hit id (0 none, 1 + i quad i, `PT_ID_SPH` + i, `PT_ID_TRI` + i). A template header
6(`pathtrace/t_intersect.h`) over the float contract of `@ajax/pathtrace-math`. Freestanding.
7
8**Ported from** `crates/pathtrace-core/src/lib.rs` (`intersect`), operation for operation. **Tested**
9through 4000 camera samples and four rendered tiles per float type against the Rust.