Files
embree/man/man3/RTCHit.3embree4

49 lines
1.9 KiB
Plaintext

.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "RTCHit" "3" "" "" "Embree Ray Tracing Kernels 4"
.SS NAME
.IP
.EX
RTCHit \- single hit structure
.EE
.SS SYNOPSIS
.IP
.EX
#include <embree4/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
};
.EE
.SS DESCRIPTION
The \f[CR]RTCHit\f[R] type defines the type of a ray/primitive
intersection result.
The hit contains the unnormalized geometric normal in object space at
the hit location (\f[CR]Ng_x\f[R], \f[CR]Ng_y\f[R], \f[CR]Ng_z\f[R]
members), the barycentric u/v coordinates of the hit (\f[CR]u\f[R] and
\f[CR]v\f[R] members), as well as the primitive ID (\f[CR]primID\f[R]
member), geometry ID (\f[CR]geomID\f[R] member), and instance ID stack
(\f[CR]instID\f[R] member) of the hit.
The parametric intersection distance is not stored inside the hit, but
stored inside the \f[CR]tfar\f[R] member of the ray.
.PP
The \f[CR]embree4/rtcore_ray.h\f[R] header additionally defines the same
hit structure in structure of array (SOA) layout for hit packets of size
4 (\f[CR]RTCHit4\f[R] type), size 8 (\f[CR]RTCHit8\f[R] type), and size
16 (\f[CR]RTCHit16\f[R] type).
The header additionally defines an \f[CR]RTCHitNt\f[R] template for hit
packets of an arbitrary compile\-time size.
.SS EXIT STATUS
.SS SEE ALSO
[RTCRay], [Multi\-Level Instancing]