67 unsigned int flags[4];
80 unsigned int primID[4];
81 unsigned int geomID[4];
106 unsigned int mask[8];
108 unsigned int flags[8];
121 unsigned int primID[8];
122 unsigned int geomID[8];
147 unsigned int mask[16];
149 unsigned int flags[16];
162 unsigned int primID[16];
163 unsigned int geomID[16];
219 #if defined(__cplusplus)
222 RTC_FORCEINLINE float& RTCRayN_org_x(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[0*N+i]; }
223 RTC_FORCEINLINE float& RTCRayN_org_y(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[1*N+i]; }
224 RTC_FORCEINLINE float& RTCRayN_org_z(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[2*N+i]; }
225 RTC_FORCEINLINE float& RTCRayN_tnear(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[3*N+i]; }
227 RTC_FORCEINLINE float& RTCRayN_dir_x(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[4*N+i]; }
228 RTC_FORCEINLINE float& RTCRayN_dir_y(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[5*N+i]; }
229 RTC_FORCEINLINE float& RTCRayN_dir_z(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[6*N+i]; }
230 RTC_FORCEINLINE float& RTCRayN_time (RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[7*N+i]; }
232 RTC_FORCEINLINE float& RTCRayN_tfar (RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
float*)ray)[8*N+i]; }
233 RTC_FORCEINLINE unsigned int& RTCRayN_mask (RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
unsigned*)ray)[9*N+i]; }
234 RTC_FORCEINLINE unsigned int& RTCRayN_id (RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
unsigned*)ray)[10*N+i]; }
235 RTC_FORCEINLINE unsigned int& RTCRayN_flags(RTCRayN* ray,
unsigned int N,
unsigned int i) {
return ((
unsigned*)ray)[11*N+i]; }
238 RTC_FORCEINLINE float& RTCHitN_Ng_x(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
float*)hit)[0*N+i]; }
239 RTC_FORCEINLINE float& RTCHitN_Ng_y(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
float*)hit)[1*N+i]; }
240 RTC_FORCEINLINE float& RTCHitN_Ng_z(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
float*)hit)[2*N+i]; }
242 RTC_FORCEINLINE float& RTCHitN_u(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
float*)hit)[3*N+i]; }
243 RTC_FORCEINLINE float& RTCHitN_v(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
float*)hit)[4*N+i]; }
245 RTC_FORCEINLINE unsigned int& RTCHitN_primID(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
unsigned*)hit)[5*N+i]; }
246 RTC_FORCEINLINE unsigned int& RTCHitN_geomID(RTCHitN* hit,
unsigned int N,
unsigned int i) {
return ((
unsigned*)hit)[6*N+i]; }
247 RTC_FORCEINLINE unsigned int& RTCHitN_instID(RTCHitN* hit,
unsigned int N,
unsigned int i,
unsigned int l) {
return ((
unsigned*)hit)[7*N+i+N*l]; }
250 RTC_FORCEINLINE RTCRayN* RTCRayHitN_RayN(RTCRayHitN* rayhit,
unsigned int N) {
return (RTCRayN*)&((
float*)rayhit)[0*
N]; }
251 RTC_FORCEINLINE RTCHitN* RTCRayHitN_HitN(RTCRayHitN* rayhit,
unsigned int N) {
return (RTCHitN*)&((
float*)rayhit)[12*
N]; }
268 unsigned int mask[
N];
284 unsigned int primID[
N];
285 unsigned int geomID[
N];
297 RTC_FORCEINLINE RTCRay rtcGetRayFromRayN(RTCRayN* rayN,
unsigned int N,
unsigned int i)
300 ray.org_x = RTCRayN_org_x(rayN,N,i);
301 ray.org_y = RTCRayN_org_y(rayN,N,i);
302 ray.org_z = RTCRayN_org_z(rayN,N,i);
303 ray.tnear = RTCRayN_tnear(rayN,N,i);
304 ray.dir_x = RTCRayN_dir_x(rayN,N,i);
305 ray.dir_y = RTCRayN_dir_y(rayN,N,i);
306 ray.dir_z = RTCRayN_dir_z(rayN,N,i);
307 ray.time = RTCRayN_time(rayN,N,i);
308 ray.tfar = RTCRayN_tfar(rayN,N,i);
309 ray.mask = RTCRayN_mask(rayN,N,i);
310 ray.id = RTCRayN_id(rayN,N,i);
311 ray.flags = RTCRayN_flags(rayN,N,i);
315 RTC_FORCEINLINE RTCHit rtcGetHitFromHitN(RTCHitN* hitN,
unsigned int N,
unsigned int i)
318 hit.Ng_x = RTCHitN_Ng_x(hitN,N,i);
319 hit.Ng_y = RTCHitN_Ng_y(hitN,N,i);
320 hit.Ng_z = RTCHitN_Ng_z(hitN,N,i);
321 hit.u = RTCHitN_u(hitN,N,i);
322 hit.v = RTCHitN_v(hitN,N,i);
323 hit.primID = RTCHitN_primID(hitN,N,i);
324 hit.geomID = RTCHitN_geomID(hitN,N,i);
326 hit.instID[l] = RTCHitN_instID(hitN,N,i,l);
330 RTC_FORCEINLINE void rtcCopyHitToHitN(RTCHitN* hitN,
const RTCHit* hit,
unsigned int N,
unsigned int i)
332 RTCHitN_Ng_x(hitN,N,i) = hit->Ng_x;
333 RTCHitN_Ng_y(hitN,N,i) = hit->Ng_y;
334 RTCHitN_Ng_z(hitN,N,i) = hit->Ng_z;
335 RTCHitN_u(hitN,N,i) = hit->u;
336 RTCHitN_v(hitN,N,i) = hit->v;
337 RTCHitN_primID(hitN,N,i) = hit->primID;
338 RTCHitN_geomID(hitN,N,i) = hit->geomID;
340 RTCHitN_instID(hitN,N,i,l) = hit->instID[l];
347 RTCRayN* ray = RTCRayHitN_RayN(rayhitN,N);
348 rh.
ray.org_x = RTCRayN_org_x(ray,N,i);
349 rh.
ray.org_y = RTCRayN_org_y(ray,N,i);
350 rh.
ray.org_z = RTCRayN_org_z(ray,N,i);
351 rh.
ray.tnear = RTCRayN_tnear(ray,N,i);
352 rh.
ray.dir_x = RTCRayN_dir_x(ray,N,i);
353 rh.
ray.dir_y = RTCRayN_dir_y(ray,N,i);
354 rh.
ray.dir_z = RTCRayN_dir_z(ray,N,i);
355 rh.
ray.time = RTCRayN_time(ray,N,i);
356 rh.
ray.tfar = RTCRayN_tfar(ray,N,i);
357 rh.
ray.mask = RTCRayN_mask(ray,N,i);
358 rh.
ray.id = RTCRayN_id(ray,N,i);
359 rh.
ray.flags = RTCRayN_flags(ray,N,i);
361 RTCHitN* hit = RTCRayHitN_HitN(rayhitN,N);
362 rh.
hit.Ng_x = RTCHitN_Ng_x(hit,N,i);
363 rh.
hit.Ng_y = RTCHitN_Ng_y(hit,N,i);
364 rh.
hit.Ng_z = RTCHitN_Ng_z(hit,N,i);
365 rh.
hit.u = RTCHitN_u(hit,N,i);
366 rh.
hit.v = RTCHitN_v(hit,N,i);
367 rh.
hit.primID = RTCHitN_primID(hit,N,i);
368 rh.
hit.geomID = RTCHitN_geomID(hit,N,i);
370 rh.
hit.instID[l] = RTCHitN_instID(hit,N,i,l);
GT_API const UT_StringHolder time
RTC_NAMESPACE_BEGIN struct RTC_ALIGN(16) RTCRay
unsigned int * instID[RTC_MAX_INSTANCE_LEVEL_COUNT]
#define RTC_MAX_INSTANCE_LEVEL_COUNT
#define RTC_NAMESPACE_END
GA_API const UT_StringHolder N
#define RTC_NAMESPACE_BEGIN