rtcCollide(3)
π rtcCollide(3) π
okay bestie, welcome to the Embree Ray Tracing Kernels 3 manual, and today's main character is rtcCollide β the girl who makes one BVH bump into another BVH. literally intersecting one BVH with another. slay.
β¨ NAME β¨
rtcCollide β intersects one BVH with another π¦
β¨ SYNOPSIS β¨
no cap, here's the whole vibe:
#include <embree3/rtcore.h>
struct RTCCollision {
unsigned int geomID0, primID0;
unsigned int geomID1, primID1;
};
typedef void (*RTCCollideFunc) (
void* userPtr,
RTCCollision* collisions,
size_t num_collisions);
void rtcCollide (
RTCScene hscene0,
RTCScene hscene1,
RTCCollideFunc callback,
void* userPtr
);
β¨ DESCRIPTION β¨
so rtcCollide takes the BVH of hscene0 and the BVH of scene hscene1 and makes them meet cute π β it intersects them, and for every pair of intersecting primitives between the two scenes it calls a user defined callback function (that's the callback argument, duh). you can also pass in a user defined data pointer (the userPtr argument) if you want.
for every pair of primitives that may intersect each other, the callback function (the callback argument, again, keep up π«Ά) gets called. the user is provided with the primIDs and geomIDs of multiple potentially intersecting primitive pairs. currently, only scenes entirely composed of user geometries are supported, so the user is expected to implement a primitive/primitive intersection to filter out false positives inside the callback function. fr fr, the callback is where you do the actual work.
the userPtr argument can be used to input geometry data of the scene, or to output results of the intersection query. she's flexible like that π
β¨ SUPPORTED PRIMITIVES β¨
rn, the only supported type is the user geometry type (peep [RTC_GEOMETRY_TYPE_USER]). that's it. that's the list. iconic, honestly π
β¨ EXIT STATUS β¨
if it goes wrong, an error code gets set β and you can query it with rtcGetDeviceError. so like, check that bestie, don't just sit there wondering π
β¨ SEE ALSO β¨
rtcCollide(3) β yes, she's referencing herself. main character energy only π
and that's the whole page, babe π this was the rtcCollide(3) page from Embree Ray Tracing Kernels 3 β mwah, go intersect some BVHs, ily, bye πβ¨
π¦ where this page comes from
- epel 9: embree 3.13.5-4.el9 Β· Apache-2.0
- fedora 43: embree3 3.13.5-9.fc41 Β· Apache-2.0
- fedora 44: embree3 3.13.5-16.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms