.\" Automatically generated by Pandoc 1.17.0.3 .\" .TH "rtcCollide" "3" "" "" "Embree Ray Tracing Kernels 3" .hy .SS NAME .IP .nf \f[C] rtcCollide\ \-\ intersects\ one\ BVH\ with\ another \f[] .fi .SS SYNOPSIS .IP .nf \f[C] #include\ 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 ); \f[] .fi .SS DESCRIPTION .PP The \f[C]rtcCollide\f[] function intersects the BVH of \f[C]hscene0\f[] with the BVH of scene \f[C]hscene1\f[] and calls a user defined callback function (e.g \f[C]callback\f[] argument) for each pair of intersecting primitives between the two scenes. A user defined data pointer (\f[C]userPtr\f[] argument) can also be passed in. .PP For every pair of primitives that may intersect each other, the callback function (\f[C]callback\f[] argument) is called. The user will be provided with the primID\[aq]s and geomID\[aq]s of multiple potentially intersecting primitive pairs. Currently, only scene entirely composed of user geometries are supported, thus the user is expected to implement a primitive/primitive intersection to filter out false positives in the callback function. The \f[C]userPtr\f[] argument can be used to input geometry data of the scene or output results of the intersection query. .SS SUPPORTED PRIMITIVES .PP Currently, the only supported type is the user geometry type (see [RTC_GEOMETRY_TYPE_USER]). .SS EXIT STATUS .PP On failure an error code is set that can be queried using \f[C]rtcGetDeviceError\f[]. .SS SEE ALSO