Skip to content

feat: add C11 binding (lightrt_c) for BVH + custom-primitive ray queries#2

Merged
syoyo merged 1 commit into
mainfrom
feat/c11-binding
May 21, 2026
Merged

feat: add C11 binding (lightrt_c) for BVH + custom-primitive ray queries#2
syoyo merged 1 commit into
mainfrom
feat/c11-binding

Conversation

@syoyo

@syoyo syoyo commented May 21, 2026

Copy link
Copy Markdown
Contributor

Expose a C11 ABI over MMapGenericBVH so C code can build a BVH and query it with custom intersection/bounds callbacks in double precision. The BVH stays fp32 for broad phase; the intersection callback receives the original fp64 ray (carried through a per-query context), so analytic primitives can be solved at full double precision (e.g. sub-nm OPL for aspheric lens tracing).

Adds lightrt_c.{h,cc} and builds them into the lightrt library (CMake + meson).

Expose a C11 ABI over MMapGenericBVH so C code can build a BVH and query it
with custom intersection/bounds callbacks in double precision. The BVH stays
fp32 for broad phase; the intersection callback receives the original fp64 ray
(carried through a per-query context), so analytic primitives can be solved at
full double precision (e.g. sub-nm OPL for aspheric lens tracing).

Adds lightrt_c.{h,cc} and builds them into the lightrt library (CMake + meson).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 21, 2026 06:12
@syoyo syoyo merged commit 3055833 into main May 21, 2026
1 check failed
@syoyo syoyo removed the request for review from Copilot May 21, 2026 06:33
syoyo added a commit that referenced this pull request Jun 29, 2026
feat: add C11 binding (lightrt_c) for BVH + custom-primitive ray queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant