rtcCollide(3)
β¨ NAME β¨
rtcCollide β bestie, this one makes one BVH collide with another BVH π₯
πΈ SYNOPSIS πΈ
#include <embree4/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 π
okay so rtcCollide takes the BVH of hscene0 and smashes it into the BVH of scene hscene1 (yes, literally, we're doing a crossover episode π) and for every single pair of intersecting primitives between the two scenes it calls a user defined callback function β that's the callback argument, btw. You can also slide in your own little data pointer, the userPtr argument, no biggie π«Ά
For every pair of primitives that may intersect each other, the callback function (the callback argument) gets called. The user gets handed the primID's and geomID's of multiple potentially intersecting primitive pairs. Now here's the tea β β currently only scenes entirely composed of user geometries are supported, so the user is expected to implement a primitive/primitive intersection to filter out the false positives inside the callback function. No cap, that part is on you π
The userPtr argument can be used to input geometry data of the scene, or to output results of the intersection query. Your pointer, your rules, main character energy β¨
π¦ SUPPORTED PRIMITIVES π¦
Currently, the only supported type is the user geometry type (see [RTC_GEOMETRY_TYPE_USER]). That's the whole list. That's it. That's the vibe check π
π EXIT STATUS π
On failure an error code is set that can be queried using rtcGetDeviceError. So if things go sideways, that's your girl to go ask π
π SEE ALSO π
literally nothing else here bestie, this is a solo act π
and that's the page, fr fr β from the Embree Ray Tracing Kernels 4 era, rtcCollide(3), no date listed but she's iconic regardless β¨π
π¦
π¦ where this page comes from
- ubuntu stonking: libembree-dev 4.4.1+dfsg-2ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms