RTCHit(3)
π NAME π
RTCHit β the single hit structure, aka the lil glow-up receipt you get when a ray actually hits something πβ¨
πΈ SYNOPSIS πΈ
#include <embree3/rtcore.h>
struct RTCHit
{
float Ng_x; // x coordinate of geometry normal
float Ng_y; // y coordinate of geometry normal
float Ng_z; // z coordinate of geometry normal
float u; // barycentric u coordinate of hit
float v; // barycentric v coordinate of hit
unsigned int primID; // geometry ID
unsigned int geomID; // primitive ID
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance ID
};
β¨ DESCRIPTION β¨
okay so bestie, RTCHit is literally the type that holds the result of a ray/primitive intersection. it's the "we found each other π₯Ή" moment, but in struct form.
this hit is carrying:
- the unnormalized geometric normal in object space at the exact hit location β that's the
Ng_x,Ng_y,Ng_zmembers π§ - the barycentric
u/vcoordinates of the hit β yup, theuandvmembers π - the primitive ID β the
primIDmember - the geometry ID β the
geomIDmember - the instance ID stack β the
instIDmember π
heads up: the parametric intersection distance is not stored inside the hit. nope, not here. it lives inside the tfar member of the ray. so don't go looking for it in the hit, she's not there π
π¦ the packet era π¦
the embree3/rtcore_ray.h header additionally defines the same hit structure in structure of array (SOA) layout for hit packets, and the sizes are:
- size 4 β
RTCHit4type - size 8 β
RTCHit8type - size 16 β
RTCHit16type
and that same header additionally defines an RTCHitNt template for hit packets of an arbitrary compile-time size β iconic behavior, honestly.
π EXIT STATUS π
(nothing here, bestie β the section is just vibing empty π«Ά)
π₯ SEE ALSO π₯
- [
RTCRay] - [
Multi-Level Instancing]
and that's the whole page, no cap. this was RTCHit(3) from the Embree Ray Tracing Kernels 3 manual set β mwah, periodt ππ¦β¨
π¦ 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