rtcInitPo...ryContext(3)
π NAME π
rtcInitPointQueryContext β bestie, this one initializes the context info (like, the stack of (multilevel-)instance transformations, yes those) for point queries β¨
π SYNOPSIS π
#include <embree3/rtcore.h>
struct RTC_ALIGN(16) RTCPointQueryContext
{
// accumulated 4x4 column major matrices from world to instance space.
float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
// accumulated 4x4 column major matrices from instance to world space.
float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
// instance ids.
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
// number of instances currently on the stack.
unsigned int instStackSize;
};
void rtcInitPointQueryContext(
struct RTCPointQueryContext* context
);
π¦ DESCRIPTION π¦
Okay so picture a stack β and it's the RTCPointQueryContext type, no cap β that keeps hold of the IDs and the instance transformations while a BVH traversal is happening for a point query. It's giving very organized. π
The transformations are assumed to be affine transformations (that's a 3Γ3 matrix plus a translation, iykyk), and therefore the last column is ignored (peep [RTC_GEOMETRY_TYPE_INSTANCE] for the deets).
The rtcInitPointContext function initializes the context to default values, and bestie, you should fr fr call it for initialization. Don't skip it. π
The context gets passed as an argument to the point query callback function (check [rtcSetGeometryPointQueryFunction]) and should be used to pass instance information down the instancing chain for user defined instancing (the tutorial [ClosestPoint] has a reference implementation of point queries with user defined instancing, go look π).
Also? The context is a necessary argument to [rtcPointQuery] β like, mandatory mandatory β and Embree internally uses the topmost instance transformation of the stack to transform the point query into instance space. Main character behavior honestly. π
π EXIT STATUS π
No error code is set by this function. Not a single one. Clean. β¨
π SEE ALSO π
- [rtcPointQuery]
- [rtcSetGeometryPointQueryFunction]
And that's the whole page, bestie β this was rtcInitPo...ryContext(3) from the Embree Ray Tracing Kernels 3 manual, section 3, and yeah the footer is literally just that same title again because the page said so. π«Ά Go forth and initialize your contexts. 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