NVIDIA OptiX 8.0 nvidia_logo_transpbg.gif Up
optix_device.h
Go to the documentation of this file.
1/*
2* Copyright (c) 2023 NVIDIA Corporation. All rights reserved.
3*
4* NVIDIA Corporation and its licensors retain all intellectual property and proprietary
5* rights in and to this software, related documentation and any modifications thereto.
6* Any use, reproduction, disclosure or distribution of this software and related
7* documentation without an express license agreement from NVIDIA Corporation is strictly
8* prohibited.
9*
10* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
11* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
12* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
13* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
14* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
15* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
16* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
17* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
18* SUCH DAMAGES
19*/
20
26
27#ifndef OPTIX_OPTIX_DEVICE_H
28#define OPTIX_OPTIX_DEVICE_H
29
30#if defined( __cplusplus ) && ( __cplusplus < 201103L ) && !defined( _WIN32 )
31#error Device code for OptiX requires at least C++11. Consider adding "--std c++11" to the nvcc command-line.
32#endif
33
34#include "optix_types.h"
35
38
60template <typename... Payload>
61static __forceinline__ __device__ void optixTrace( OptixTraversableHandle handle,
62 float3 rayOrigin,
63 float3 rayDirection,
64 float tmin,
65 float tmax,
66 float rayTime,
67 OptixVisibilityMask visibilityMask,
68 unsigned int rayFlags,
69 unsigned int SBToffset,
70 unsigned int SBTstride,
71 unsigned int missSBTIndex,
72 Payload&... payload );
73
93template <typename... Payload>
94static __forceinline__ __device__ void optixTraverse( OptixTraversableHandle handle,
95 float3 rayOrigin,
96 float3 rayDirection,
97 float tmin,
98 float tmax,
99 float rayTime,
100 OptixVisibilityMask visibilityMask,
101 unsigned int rayFlags,
102 unsigned int SBToffset,
103 unsigned int SBTstride,
104 unsigned int missSBTIndex,
105 Payload&... payload );
106
124template <typename... Payload>
125static __forceinline__ __device__ void optixTrace( OptixPayloadTypeID type,
127 float3 rayOrigin,
128 float3 rayDirection,
129 float tmin,
130 float tmax,
131 float rayTime,
132 OptixVisibilityMask visibilityMask,
133 unsigned int rayFlags,
134 unsigned int SBToffset,
135 unsigned int SBTstride,
136 unsigned int missSBTIndex,
137 Payload&... payload );
138
159template <typename... Payload>
160static __forceinline__ __device__ void optixTraverse( OptixPayloadTypeID type,
162 float3 rayOrigin,
163 float3 rayDirection,
164 float tmin,
165 float tmax,
166 float rayTime,
167 OptixVisibilityMask visibilityMask,
168 unsigned int rayFlags,
169 unsigned int SBToffset,
170 unsigned int SBTstride,
171 unsigned int missSBTIndex,
172 Payload&... payload );
173
184static __forceinline__ __device__ void optixReorder( unsigned int coherenceHint, unsigned int numCoherenceHintBitsFromLSB );
185
189static __forceinline__ __device__ void optixReorder();
190
199template <typename... Payload>
200static __forceinline__ __device__ void optixInvoke( Payload&... payload );
201
211template <typename... Payload>
212static __forceinline__ __device__ void optixInvoke( OptixPayloadTypeID type, Payload&... payload );
213
232template <typename... RegAttributes>
233static __forceinline__ __device__ void optixMakeHitObject( OptixTraversableHandle handle,
234 float3 rayOrigin,
235 float3 rayDirection,
236 float tmin,
237 float tmax,
238 float rayTime,
239 unsigned int SBToffset,
240 unsigned int SBTstride,
241 unsigned int instIdx,
242 unsigned int sbtGASIdx,
243 unsigned int primIdx,
244 unsigned int hitKind,
245 RegAttributes... regAttributes );
246
269template <typename... RegAttributes>
270static __forceinline__ __device__ void optixMakeHitObject( OptixTraversableHandle handle,
271 float3 rayOrigin,
272 float3 rayDirection,
273 float tmin,
274 float tmax,
275 float rayTime,
276 unsigned int SBToffset,
277 unsigned int SBTstride,
278 unsigned int instIdx,
279 const OptixTraversableHandle* transforms,
280 unsigned int numTransforms,
281 unsigned int sbtGASIdx,
282 unsigned int primIdx,
283 unsigned int hitKind,
284 RegAttributes... regAttributes );
285
306template <typename... RegAttributes>
307static __forceinline__ __device__ void optixMakeHitObjectWithRecord( OptixTraversableHandle handle,
308 float3 rayOrigin,
309 float3 rayDirection,
310 float tmin,
311 float tmax,
312 float rayTime,
313 unsigned int sbtRecordIndex,
314 unsigned int instIdx,
315 const OptixTraversableHandle* transforms,
316 unsigned int numTransforms,
317 unsigned int sbtGASIdx,
318 unsigned int primIdx,
319 unsigned int hitKind,
320 RegAttributes... regAttributes );
321
334static __forceinline__ __device__ void optixMakeMissHitObject( unsigned int missSBTIndex,
335 float3 rayOrigin,
336 float3 rayDirection,
337 float tmin,
338 float tmax,
339 float rayTime );
340
348static __forceinline__ __device__ void optixMakeNopHitObject();
349
353static __forceinline__ __device__ bool optixHitObjectIsHit();
354
358static __forceinline__ __device__ bool optixHitObjectIsMiss();
359
365static __forceinline__ __device__ bool optixHitObjectIsNop();
366
373static __forceinline__ __device__ unsigned int optixHitObjectGetSbtRecordIndex();
374
380static __forceinline__ __device__ void optixSetPayload_0( unsigned int p );
381static __forceinline__ __device__ void optixSetPayload_1( unsigned int p );
382static __forceinline__ __device__ void optixSetPayload_2( unsigned int p );
383static __forceinline__ __device__ void optixSetPayload_3( unsigned int p );
384static __forceinline__ __device__ void optixSetPayload_4( unsigned int p );
385static __forceinline__ __device__ void optixSetPayload_5( unsigned int p );
386static __forceinline__ __device__ void optixSetPayload_6( unsigned int p );
387static __forceinline__ __device__ void optixSetPayload_7( unsigned int p );
388static __forceinline__ __device__ void optixSetPayload_8( unsigned int p );
389static __forceinline__ __device__ void optixSetPayload_9( unsigned int p );
390static __forceinline__ __device__ void optixSetPayload_10( unsigned int p );
391static __forceinline__ __device__ void optixSetPayload_11( unsigned int p );
392static __forceinline__ __device__ void optixSetPayload_12( unsigned int p );
393static __forceinline__ __device__ void optixSetPayload_13( unsigned int p );
394static __forceinline__ __device__ void optixSetPayload_14( unsigned int p );
395static __forceinline__ __device__ void optixSetPayload_15( unsigned int p );
396static __forceinline__ __device__ void optixSetPayload_16( unsigned int p );
397static __forceinline__ __device__ void optixSetPayload_17( unsigned int p );
398static __forceinline__ __device__ void optixSetPayload_18( unsigned int p );
399static __forceinline__ __device__ void optixSetPayload_19( unsigned int p );
400static __forceinline__ __device__ void optixSetPayload_20( unsigned int p );
401static __forceinline__ __device__ void optixSetPayload_21( unsigned int p );
402static __forceinline__ __device__ void optixSetPayload_22( unsigned int p );
403static __forceinline__ __device__ void optixSetPayload_23( unsigned int p );
404static __forceinline__ __device__ void optixSetPayload_24( unsigned int p );
405static __forceinline__ __device__ void optixSetPayload_25( unsigned int p );
406static __forceinline__ __device__ void optixSetPayload_26( unsigned int p );
407static __forceinline__ __device__ void optixSetPayload_27( unsigned int p );
408static __forceinline__ __device__ void optixSetPayload_28( unsigned int p );
409static __forceinline__ __device__ void optixSetPayload_29( unsigned int p );
410static __forceinline__ __device__ void optixSetPayload_30( unsigned int p );
411static __forceinline__ __device__ void optixSetPayload_31( unsigned int p );
412
418static __forceinline__ __device__ unsigned int optixGetPayload_0();
419static __forceinline__ __device__ unsigned int optixGetPayload_1();
420static __forceinline__ __device__ unsigned int optixGetPayload_2();
421static __forceinline__ __device__ unsigned int optixGetPayload_3();
422static __forceinline__ __device__ unsigned int optixGetPayload_4();
423static __forceinline__ __device__ unsigned int optixGetPayload_5();
424static __forceinline__ __device__ unsigned int optixGetPayload_6();
425static __forceinline__ __device__ unsigned int optixGetPayload_7();
426static __forceinline__ __device__ unsigned int optixGetPayload_8();
427static __forceinline__ __device__ unsigned int optixGetPayload_9();
428static __forceinline__ __device__ unsigned int optixGetPayload_10();
429static __forceinline__ __device__ unsigned int optixGetPayload_11();
430static __forceinline__ __device__ unsigned int optixGetPayload_12();
431static __forceinline__ __device__ unsigned int optixGetPayload_13();
432static __forceinline__ __device__ unsigned int optixGetPayload_14();
433static __forceinline__ __device__ unsigned int optixGetPayload_15();
434static __forceinline__ __device__ unsigned int optixGetPayload_16();
435static __forceinline__ __device__ unsigned int optixGetPayload_17();
436static __forceinline__ __device__ unsigned int optixGetPayload_18();
437static __forceinline__ __device__ unsigned int optixGetPayload_19();
438static __forceinline__ __device__ unsigned int optixGetPayload_20();
439static __forceinline__ __device__ unsigned int optixGetPayload_21();
440static __forceinline__ __device__ unsigned int optixGetPayload_22();
441static __forceinline__ __device__ unsigned int optixGetPayload_23();
442static __forceinline__ __device__ unsigned int optixGetPayload_24();
443static __forceinline__ __device__ unsigned int optixGetPayload_25();
444static __forceinline__ __device__ unsigned int optixGetPayload_26();
445static __forceinline__ __device__ unsigned int optixGetPayload_27();
446static __forceinline__ __device__ unsigned int optixGetPayload_28();
447static __forceinline__ __device__ unsigned int optixGetPayload_29();
448static __forceinline__ __device__ unsigned int optixGetPayload_30();
449static __forceinline__ __device__ unsigned int optixGetPayload_31();
450
459static __forceinline__ __device__ void optixSetPayloadTypes( unsigned int typeMask );
460
464static __forceinline__ __device__ unsigned int optixUndefinedValue();
465
472static __forceinline__ __device__ float3 optixGetWorldRayOrigin();
473
480static __forceinline__ __device__ float3 optixHitObjectGetWorldRayOrigin();
481
488static __forceinline__ __device__ float3 optixGetWorldRayDirection();
489
496static __forceinline__ __device__ float3 optixHitObjectGetWorldRayDirection();
497
501static __forceinline__ __device__ float3 optixGetObjectRayOrigin();
502
506static __forceinline__ __device__ float3 optixGetObjectRayDirection();
507
511static __forceinline__ __device__ float optixGetRayTmin();
512
519static __forceinline__ __device__ float optixHitObjectGetRayTmin();
520
529static __forceinline__ __device__ float optixGetRayTmax();
530
539static __forceinline__ __device__ float optixHitObjectGetRayTmax();
540
546static __forceinline__ __device__ float optixGetRayTime();
547
554static __forceinline__ __device__ float optixHitObjectGetRayTime();
555
559static __forceinline__ __device__ unsigned int optixGetRayFlags();
560
564static __forceinline__ __device__ unsigned int optixGetRayVisibilityMask();
565
572static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceTraversableFromIAS( OptixTraversableHandle ias, unsigned int instIdx );
573
584static __forceinline__ __device__ void optixGetTriangleVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float3 data[3]);
585
590static __forceinline__ __device__ void optixGetMicroTriangleVertexData( float3 data[3] );
591
596static __forceinline__ __device__ void optixGetMicroTriangleBarycentricsData( float2 data[3] );
597
610static __forceinline__ __device__ void optixGetLinearCurveVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[2] );
611
624static __forceinline__ __device__ void optixGetQuadraticBSplineVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3] );
625
638static __forceinline__ __device__ void optixGetCubicBSplineVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4] );
639
652static __forceinline__ __device__ void optixGetCatmullRomVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4] );
653
666static __forceinline__ __device__ void optixGetCubicBezierVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4] );
667
680static __forceinline__ __device__ void optixGetRibbonVertexData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3] );
681
685static __forceinline__ __device__ float3 optixGetRibbonNormal( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float2 ribbonParameters );
686
699static __forceinline__ __device__ void optixGetSphereData( OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[1] );
700
705static __forceinline__ __device__ OptixTraversableHandle optixGetGASTraversableHandle();
706
710static __forceinline__ __device__ float optixGetGASMotionTimeBegin( OptixTraversableHandle gas );
711
715static __forceinline__ __device__ float optixGetGASMotionTimeEnd( OptixTraversableHandle gas );
716
720static __forceinline__ __device__ unsigned int optixGetGASMotionStepCount( OptixTraversableHandle gas );
721
728static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix( float m[12] );
729
736static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix( float m[12] );
737
744static __forceinline__ __device__ float3 optixTransformPointFromWorldToObjectSpace( float3 point );
745
752static __forceinline__ __device__ float3 optixTransformVectorFromWorldToObjectSpace( float3 vec );
753
760static __forceinline__ __device__ float3 optixTransformNormalFromWorldToObjectSpace( float3 normal );
761
768static __forceinline__ __device__ float3 optixTransformPointFromObjectToWorldSpace( float3 point );
769
776static __forceinline__ __device__ float3 optixTransformVectorFromObjectToWorldSpace( float3 vec );
777
784static __forceinline__ __device__ float3 optixTransformNormalFromObjectToWorldSpace( float3 normal );
785
789static __forceinline__ __device__ unsigned int optixGetTransformListSize();
790
799static __forceinline__ __device__ unsigned int optixHitObjectGetTransformListSize();
800
804static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle( unsigned int index );
805
814static __forceinline__ __device__ OptixTraversableHandle optixHitObjectGetTransformListHandle( unsigned int index );
815
820
826static __forceinline__ __device__ const OptixStaticTransform* optixGetStaticTransformFromHandle( OptixTraversableHandle handle );
827
834
841
847static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle( OptixTraversableHandle handle );
848
855
861static __forceinline__ __device__ const float4* optixGetInstanceTransformFromHandle( OptixTraversableHandle handle );
862
868static __forceinline__ __device__ const float4* optixGetInstanceInverseTransformFromHandle( OptixTraversableHandle handle );
869
893static __forceinline__ __device__ bool optixReportIntersection( float hitT, unsigned int hitKind );
894
900static __forceinline__ __device__ bool optixReportIntersection( float hitT, unsigned int hitKind, unsigned int a0 );
901
907static __forceinline__ __device__ bool optixReportIntersection( float hitT, unsigned int hitKind, unsigned int a0, unsigned int a1 );
908
914static __forceinline__ __device__ bool optixReportIntersection( float hitT, unsigned int hitKind, unsigned int a0, unsigned int a1, unsigned int a2 );
915
921static __forceinline__ __device__ bool optixReportIntersection( float hitT,
922 unsigned int hitKind,
923 unsigned int a0,
924 unsigned int a1,
925 unsigned int a2,
926 unsigned int a3 );
927
933static __forceinline__ __device__ bool optixReportIntersection( float hitT,
934 unsigned int hitKind,
935 unsigned int a0,
936 unsigned int a1,
937 unsigned int a2,
938 unsigned int a3,
939 unsigned int a4 );
940
946static __forceinline__ __device__ bool optixReportIntersection( float hitT,
947 unsigned int hitKind,
948 unsigned int a0,
949 unsigned int a1,
950 unsigned int a2,
951 unsigned int a3,
952 unsigned int a4,
953 unsigned int a5 );
954
960static __forceinline__ __device__ bool optixReportIntersection( float hitT,
961 unsigned int hitKind,
962 unsigned int a0,
963 unsigned int a1,
964 unsigned int a2,
965 unsigned int a3,
966 unsigned int a4,
967 unsigned int a5,
968 unsigned int a6 );
969
975static __forceinline__ __device__ bool optixReportIntersection( float hitT,
976 unsigned int hitKind,
977 unsigned int a0,
978 unsigned int a1,
979 unsigned int a2,
980 unsigned int a3,
981 unsigned int a4,
982 unsigned int a5,
983 unsigned int a6,
984 unsigned int a7 );
985
990static __forceinline__ __device__ unsigned int optixGetAttribute_0();
991static __forceinline__ __device__ unsigned int optixGetAttribute_1();
992static __forceinline__ __device__ unsigned int optixGetAttribute_2();
993static __forceinline__ __device__ unsigned int optixGetAttribute_3();
994static __forceinline__ __device__ unsigned int optixGetAttribute_4();
995static __forceinline__ __device__ unsigned int optixGetAttribute_5();
996static __forceinline__ __device__ unsigned int optixGetAttribute_6();
997static __forceinline__ __device__ unsigned int optixGetAttribute_7();
998
999
1007static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_0();
1008static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_1();
1009static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_2();
1010static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_3();
1011static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_4();
1012static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_5();
1013static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_6();
1014static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_7();
1015
1019static __forceinline__ __device__ void optixTerminateRay();
1020
1025static __forceinline__ __device__ void optixIgnoreIntersection();
1026
1027
1043static __forceinline__ __device__ unsigned int optixGetPrimitiveIndex();
1044
1052static __forceinline__ __device__ unsigned int optixHitObjectGetPrimitiveIndex();
1053
1064static __forceinline__ __device__ unsigned int optixGetSbtGASIndex();
1065
1074static __forceinline__ __device__ unsigned int optixHitObjectGetSbtGASIndex();
1075
1076
1089static __forceinline__ __device__ unsigned int optixGetInstanceId();
1090
1099static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceId();
1100
1110static __forceinline__ __device__ unsigned int optixGetInstanceIndex();
1111
1120static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceIndex();
1121
1129static __forceinline__ __device__ unsigned int optixGetHitKind();
1130
1138static __forceinline__ __device__ unsigned int optixHitObjectGetHitKind();
1139
1143static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType( unsigned int hitKind );
1144
1148static __forceinline__ __device__ bool optixIsFrontFaceHit( unsigned int hitKind );
1149
1153static __forceinline__ __device__ bool optixIsBackFaceHit( unsigned int hitKind );
1154
1158static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType();
1159
1163static __forceinline__ __device__ bool optixIsFrontFaceHit();
1164
1168static __forceinline__ __device__ bool optixIsBackFaceHit();
1169
1173static __forceinline__ __device__ bool optixIsTriangleHit();
1174
1178static __forceinline__ __device__ bool optixIsTriangleFrontFaceHit();
1179
1183static __forceinline__ __device__ bool optixIsTriangleBackFaceHit();
1184
1188static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleHit();
1189
1193static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleFrontFaceHit();
1194
1198static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleBackFaceHit();
1199
1206static __forceinline__ __device__ float2 optixGetTriangleBarycentrics();
1207
1212static __forceinline__ __device__ float optixGetCurveParameter();
1213
1219static __forceinline__ __device__ float2 optixGetRibbonParameters();
1220
1227static __forceinline__ __device__ uint3 optixGetLaunchIndex();
1228
1233static __forceinline__ __device__ uint3 optixGetLaunchDimensions();
1234
1242static __forceinline__ __device__ CUdeviceptr optixGetSbtDataPointer();
1243
1250static __forceinline__ __device__ CUdeviceptr optixHitObjectGetSbtDataPointer();
1251
1266static __forceinline__ __device__ void optixThrowException( int exceptionCode );
1267
1273static __forceinline__ __device__ void optixThrowException( int exceptionCode, unsigned int exceptionDetail0 );
1274
1280static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1281 unsigned int exceptionDetail0,
1282 unsigned int exceptionDetail1 );
1283
1289static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1290 unsigned int exceptionDetail0,
1291 unsigned int exceptionDetail1,
1292 unsigned int exceptionDetail2 );
1293
1299static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1300 unsigned int exceptionDetail0,
1301 unsigned int exceptionDetail1,
1302 unsigned int exceptionDetail2,
1303 unsigned int exceptionDetail3 );
1304
1310static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1311 unsigned int exceptionDetail0,
1312 unsigned int exceptionDetail1,
1313 unsigned int exceptionDetail2,
1314 unsigned int exceptionDetail3,
1315 unsigned int exceptionDetail4 );
1316
1322static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1323 unsigned int exceptionDetail0,
1324 unsigned int exceptionDetail1,
1325 unsigned int exceptionDetail2,
1326 unsigned int exceptionDetail3,
1327 unsigned int exceptionDetail4,
1328 unsigned int exceptionDetail5 );
1329
1336static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1337 unsigned int exceptionDetail0,
1338 unsigned int exceptionDetail1,
1339 unsigned int exceptionDetail2,
1340 unsigned int exceptionDetail3,
1341 unsigned int exceptionDetail4,
1342 unsigned int exceptionDetail5,
1343 unsigned int exceptionDetail6 );
1344
1350static __forceinline__ __device__ void optixThrowException( int exceptionCode,
1351 unsigned int exceptionDetail0,
1352 unsigned int exceptionDetail1,
1353 unsigned int exceptionDetail2,
1354 unsigned int exceptionDetail3,
1355 unsigned int exceptionDetail4,
1356 unsigned int exceptionDetail5,
1357 unsigned int exceptionDetail6,
1358 unsigned int exceptionDetail7 );
1359
1363static __forceinline__ __device__ int optixGetExceptionCode();
1364
1371static __forceinline__ __device__ unsigned int optixGetExceptionDetail_0();
1372
1378static __forceinline__ __device__ unsigned int optixGetExceptionDetail_1();
1379
1385static __forceinline__ __device__ unsigned int optixGetExceptionDetail_2();
1386
1392static __forceinline__ __device__ unsigned int optixGetExceptionDetail_3();
1393
1399static __forceinline__ __device__ unsigned int optixGetExceptionDetail_4();
1400
1406static __forceinline__ __device__ unsigned int optixGetExceptionDetail_5();
1407
1413static __forceinline__ __device__ unsigned int optixGetExceptionDetail_6();
1414
1420static __forceinline__ __device__ unsigned int optixGetExceptionDetail_7();
1421
1422
1435static __forceinline__ __device__ char* optixGetExceptionLineInfo();
1436
1460template <typename ReturnT, typename... ArgTypes>
1461static __forceinline__ __device__ ReturnT optixDirectCall( unsigned int sbtIndex, ArgTypes... args );
1462
1463
1486template <typename ReturnT, typename... ArgTypes>
1487static __forceinline__ __device__ ReturnT optixContinuationCall( unsigned int sbtIndex, ArgTypes... args );
1488
1489
1554static __forceinline__ __device__ uint4 optixTexFootprint2D( unsigned long long tex, unsigned int texInfo, float x, float y, unsigned int* singleMipLevel );
1555
1567static __forceinline__ __device__ uint4
1568optixTexFootprint2DLod( unsigned long long tex, unsigned int texInfo, float x, float y, float level, bool coarse, unsigned int* singleMipLevel );
1569
1584static __forceinline__ __device__ uint4 optixTexFootprint2DGrad( unsigned long long tex,
1585 unsigned int texInfo,
1586 float x,
1587 float y,
1588 float dPdx_x,
1589 float dPdx_y,
1590 float dPdy_x,
1591 float dPdy_y,
1592 bool coarse,
1593 unsigned int* singleMipLevel );
1594 // end group optix_device_api
1596
1597#define __OPTIX_INCLUDE_INTERNAL_HEADERS__
1598
1600
1601#endif // OPTIX_OPTIX_DEVICE_H
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_7()
Returns the 32-bit exception detail at slot 7.
static __forceinline__ __device__ ReturnT optixContinuationCall(unsigned int sbtIndex, ArgTypes... args)
Creates a call to the continuation callable program at the specified SBT entry.
static __forceinline__ __device__ void optixThrowException(int exceptionCode)
Throws a user exception with the given exception code (overload without exception details).
static __forceinline__ __device__ unsigned int optixGetPayload_2()
static __forceinline__ __device__ void optixSetPayload_16(unsigned int p)
static __forceinline__ __device__ float3 optixTransformNormalFromWorldToObjectSpace(float3 normal)
Transforms the normal using world-to-object transformation matrix resulting from the current active t...
static __forceinline__ __device__ unsigned int optixGetPayload_25()
static __forceinline__ __device__ unsigned int optixGetPayload_1()
static __forceinline__ __device__ unsigned int optixGetPayload_15()
static __forceinline__ __device__ OptixTraversableHandle optixGetGASTraversableHandle()
Returns the traversable handle for the Geometry Acceleration Structure (GAS) containing the current h...
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtGASIndex()
Return the SBT GAS index of the closest intersected primitive associated with the current outgoing hi...
static __forceinline__ __device__ uint3 optixGetLaunchDimensions()
Available in any program, it returns the dimensions of the current launch specified by optixLaunch on...
static __forceinline__ __device__ void optixSetPayload_11(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_8(unsigned int p)
static __forceinline__ __device__ void optixMakeHitObject(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, unsigned int SBToffset, unsigned int SBTstride, unsigned int instIdx, unsigned int sbtGASIdx, unsigned int primIdx, unsigned int hitKind, RegAttributes... regAttributes)
Constructs an outgoing hit object from the hit information provided. This hit object will now become ...
static __forceinline__ __device__ void optixSetPayload_5(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetPayload_9()
static __forceinline__ __device__ void optixSetPayload_29(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_14(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_2()
Returns the 32-bit exception detail at slot 2.
static __forceinline__ __device__ const OptixStaticTransform * optixGetStaticTransformFromHandle(OptixTraversableHandle handle)
Returns a pointer to a OptixStaticTransform from its traversable handle.
static __forceinline__ __device__ void optixSetPayload_19(unsigned int p)
static __forceinline__ __device__ float3 optixGetWorldRayDirection()
Returns the rayDirection passed into optixTrace.
static __forceinline__ __device__ float3 optixGetObjectRayOrigin()
Returns the current object space ray origin based on the current transform stack.
static __forceinline__ __device__ bool optixIsFrontFaceHit(unsigned int hitKind)
Function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ unsigned int optixGetAttribute_4()
static __forceinline__ __device__ unsigned int optixGetPayload_4()
static __forceinline__ __device__ void optixSetPayload_10(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetPayload_18()
static __forceinline__ __device__ bool optixHitObjectIsHit()
Returns true if the current outgoing hit object contains a hit.
static __forceinline__ __device__ unsigned int optixGetAttribute_6()
static __forceinline__ __device__ void optixMakeNopHitObject()
Constructs an outgoing hit object that when invoked does nothing (neither the miss nor the closest hi...
static __forceinline__ __device__ unsigned int optixGetAttribute_3()
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_4()
static __forceinline__ __device__ void optixSetPayload_20(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_4(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetPayload_5()
static __forceinline__ __device__ unsigned int optixGetPayload_22()
static __forceinline__ __device__ bool optixIsTriangleHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ void optixGetCubicBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Return the object space curve control vertex data of a cubic BSpline curve in a Geometry Acceleration...
static __forceinline__ __device__ unsigned int optixGetPayload_27()
static __forceinline__ __device__ float optixGetGASMotionTimeEnd(OptixTraversableHandle gas)
Returns the motion end time of a GAS (see OptixMotionOptions)
static __forceinline__ __device__ uint4 optixTexFootprint2DGrad(unsigned long long tex, unsigned int texInfo, float x, float y, float dPdx_x, float dPdx_y, float dPdy_x, float dPdy_y, bool coarse, unsigned int *singleMipLevel)
optixTexFootprint2DGrad calculates the footprint of a corresponding 2D texture fetch (tex2DGrad)
static __forceinline__ __device__ void optixSetPayload_6(unsigned int p)
static __forceinline__ __device__ void optixMakeHitObjectWithRecord(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, unsigned int sbtRecordIndex, unsigned int instIdx, const OptixTraversableHandle *transforms, unsigned int numTransforms, unsigned int sbtGASIdx, unsigned int primIdx, unsigned int hitKind, RegAttributes... regAttributes)
Constructs an outgoing hit object from the hit information provided. The SBT record index is explicit...
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayDirection()
Returns the rayDirection passed into optixTraverse, optixMakeHitObject, optixMakeHitObjectWithRecord,...
static __forceinline__ __device__ unsigned int optixGetAttribute_1()
static __forceinline__ __device__ bool optixIsTriangleBackFaceHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ unsigned int optixGetAttribute_5()
static __forceinline__ __device__ OptixTraversableHandle optixHitObjectGetTransformListHandle(unsigned int index)
Returns the traversable handle for a transform in the current transform list associated with the outg...
static __forceinline__ __device__ void optixGetRibbonVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Return the object space curve control vertex data of a ribbon (flat quadratic BSpline) in a Geometry ...
static __forceinline__ __device__ void optixSetPayload_25(unsigned int p)
static __forceinline__ __device__ void optixInvoke(Payload &... payload)
Invokes closesthit, miss or nop based on the current outgoing hit object. After execution the current...
static __forceinline__ __device__ unsigned int optixGetRayFlags()
Returns the rayFlags passed into optixTrace.
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceId()
Returns the OptixInstance::instanceId of the instance within the top level acceleration structure ass...
static __forceinline__ __device__ unsigned int optixHitObjectGetSbtRecordIndex()
Returns the SBT record index associated with the hit or miss program for the current outgoing hit obj...
static __forceinline__ __device__ float3 optixTransformPointFromObjectToWorldSpace(float3 point)
Transforms the point using object-to-world transformation matrix resulting from the current active tr...
static __forceinline__ __device__ unsigned int optixGetPayload_26()
static __forceinline__ __device__ void optixMakeMissHitObject(unsigned int missSBTIndex, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime)
Constructs an outgoing hit object from the miss information provided. The SBT record index is explici...
static __forceinline__ __device__ void optixSetPayload_17(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_7(unsigned int p)
static __forceinline__ __device__ ReturnT optixDirectCall(unsigned int sbtIndex, ArgTypes... args)
Creates a call to the direct callable program at the specified SBT entry.
static __forceinline__ __device__ unsigned int optixGetPayload_30()
static __forceinline__ __device__ void optixSetPayload_28(unsigned int p)
static __forceinline__ __device__ OptixPrimitiveType optixGetPrimitiveType(unsigned int hitKind)
Function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ float3 optixTransformVectorFromObjectToWorldSpace(float3 vec)
Transforms the vector using object-to-world transformation matrix resulting from the current active t...
static __forceinline__ __device__ unsigned int optixGetInstanceId()
Returns the OptixInstance::instanceId of the instance within the top level acceleration structure ass...
static __forceinline__ __device__ char * optixGetExceptionLineInfo()
Returns a string that includes information about the source location that caused the current exceptio...
static __forceinline__ __device__ void optixSetPayload_27(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_2(unsigned int p)
static __forceinline__ __device__ void optixGetCatmullRomVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Return the object space curve control vertex data of a CatmullRom spline curve in a Geometry Accelera...
static __forceinline__ __device__ int optixGetExceptionCode()
Returns the exception code.
static __forceinline__ __device__ void optixSetPayload_12(unsigned int p)
static __forceinline__ __device__ void optixGetObjectToWorldTransformMatrix(float m[12])
Returns the object-to-world transformation matrix resulting from the current active transformation li...
static __forceinline__ __device__ unsigned int optixGetPayload_24()
static __forceinline__ __device__ unsigned int optixGetPayload_17()
static __forceinline__ __device__ float optixHitObjectGetRayTmax()
If the hit object is a hit, returns the smallest reported hitT.
static __forceinline__ __device__ const OptixMatrixMotionTransform * optixGetMatrixMotionTransformFromHandle(OptixTraversableHandle handle)
Returns a pointer to a OptixMatrixMotionTransform from its traversable handle.
static __forceinline__ __device__ void optixGetSphereData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[1])
Return the object space sphere data, center point and radius, in a Geometry Acceleration Structure (G...
static __forceinline__ __device__ unsigned int optixGetPayload_13()
static __forceinline__ __device__ uint4 optixTexFootprint2D(unsigned long long tex, unsigned int texInfo, float x, float y, unsigned int *singleMipLevel)
optixTexFootprint2D calculates the footprint of a corresponding 2D texture fetch (non-mipmapped).
static __forceinline__ __device__ void optixSetPayload_23(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetAttribute_0()
Returns the attribute at the given slot index. There are up to 8 attributes available....
static __forceinline__ __device__ void optixSetPayloadTypes(unsigned int typeMask)
Specify the supported payload types for a program.
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_6()
static __forceinline__ __device__ float optixHitObjectGetRayTmin()
Returns the tmin passed into optixTraverse, optixMakeHitObject, optixMakeHitObjectWithRecord,...
static __forceinline__ __device__ unsigned int optixGetPayload_10()
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_1()
static __forceinline__ __device__ void optixGetQuadraticBSplineVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[3])
Return the object space curve control vertex data of a quadratic BSpline curve in a Geometry Accelera...
static __forceinline__ __device__ uint3 optixGetLaunchIndex()
Available in any program, it returns the current launch index within the launch dimensions specified ...
static __forceinline__ __device__ unsigned int optixGetPayload_31()
static __forceinline__ __device__ void optixSetPayload_24(unsigned int p)
static __forceinline__ __device__ void optixTerminateRay()
Record the hit, stops traversal, and proceeds to CH.
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceTraversableFromIAS(OptixTraversableHandle ias, unsigned int instIdx)
Return the traversable handle of a given instance in an Instance Acceleration Structure (IAS)
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_0()
Return the attribute at the given slot index for the current outgoing hit object. There are up to 8 a...
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_6()
Returns the 32-bit exception detail at slot 6.
static __forceinline__ __device__ unsigned int optixGetAttribute_7()
static __forceinline__ __device__ bool optixHitObjectIsNop()
Returns true if the current outgoing hit object contains neither a hit nor miss. If executed with opt...
static __forceinline__ __device__ unsigned int optixGetRayVisibilityMask()
Returns the visibilityMask passed into optixTrace.
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_2()
static __forceinline__ __device__ void optixSetPayload_30(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle(OptixTraversableHandle handle)
Returns instanceId from an OptixInstance traversable.
static __forceinline__ __device__ unsigned int optixHitObjectGetInstanceIndex()
Returns the zero-based index of the instance within its instance acceleration structure associated wi...
static __forceinline__ __device__ void optixGetLinearCurveVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[2])
Return the object space curve control vertex data of a linear curve in a Geometry Acceleration Struct...
static __forceinline__ __device__ unsigned int optixGetPayload_3()
static __forceinline__ __device__ float optixHitObjectGetRayTime()
Returns the rayTime passed into optixTraverse, optixMakeHitObject, optixMakeHitObjectWithRecord,...
static __forceinline__ __device__ bool optixReportIntersection(float hitT, unsigned int hitKind)
Reports an intersections (overload without attributes).
static __forceinline__ __device__ float optixGetGASMotionTimeBegin(OptixTraversableHandle gas)
Returns the motion begin time of a GAS (see OptixMotionOptions)
static __forceinline__ __device__ unsigned int optixGetPayload_23()
static __forceinline__ __device__ unsigned int optixGetPayload_20()
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_3()
static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle(unsigned int index)
Returns the traversable handle for a transform in the current transform list.
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_0()
Returns the 32-bit exception detail at slot 0.
static __forceinline__ __device__ unsigned int optixUndefinedValue()
Returns an undefined value.
static __forceinline__ __device__ float2 optixGetRibbonParameters()
Returns the ribbon parameters along directrix (length) and generator (width) of the current intersect...
static __forceinline__ __device__ unsigned int optixHitObjectGetTransformListSize()
Returns the number of transforms associated with the current outgoing hit object's transform list.
static __forceinline__ __device__ void optixIgnoreIntersection()
Discards the hit, and returns control to the calling optixReportIntersection or built-in intersection...
static __forceinline__ __device__ float optixGetRayTmax()
In IS and CH returns the current smallest reported hitT or the tmax passed into optixTrace if no hit ...
static __forceinline__ __device__ CUdeviceptr optixHitObjectGetSbtDataPointer()
Device pointer address for the SBT associated with the hit or miss program for the current outgoing h...
static __forceinline__ __device__ float3 optixTransformNormalFromObjectToWorldSpace(float3 normal)
Transforms the normal using object-to-world transformation matrix resulting from the current active t...
static __forceinline__ __device__ void optixGetCubicBezierVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float4 data[4])
Return the object space curve control vertex data of a cubic Bezier curve in a Geometry Acceleration ...
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_1()
Returns the 32-bit exception detail at slot 1.
static __forceinline__ __device__ float2 optixGetTriangleBarycentrics()
Convenience function that returns the first two attributes as floats.
static __forceinline__ __device__ float3 optixHitObjectGetWorldRayOrigin()
Returns the rayOrigin passed into optixTraverse, optixMakeHitObject, optixMakeHitObjectWithRecord,...
static __forceinline__ __device__ float3 optixGetObjectRayDirection()
Returns the current object space ray direction based on the current transform stack.
static __forceinline__ __device__ unsigned int optixGetPayload_6()
static __forceinline__ __device__ void optixSetPayload_9(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_26(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetGASMotionStepCount(OptixTraversableHandle gas)
Returns the number of motion steps of a GAS (see OptixMotionOptions)
static __forceinline__ __device__ unsigned int optixGetPayload_11()
static __forceinline__ __device__ void optixGetMicroTriangleVertexData(float3 data[3])
Return the object space micro triangle vertex positions of the current hit. The current hit must be a...
static __forceinline__ __device__ unsigned int optixHitObjectGetHitKind()
Returns the 8 bit hit kind associated with the current outgoing hit object.
static __forceinline__ __device__ bool optixHitObjectIsMiss()
Returns true if the current outgoing hit object contains a miss.
static __forceinline__ __device__ void optixGetWorldToObjectTransformMatrix(float m[12])
Returns the world-to-object transformation matrix resulting from the current active transformation li...
static __forceinline__ __device__ unsigned int optixGetInstanceIndex()
Returns the zero-based index of the instance within its instance acceleration structure associated wi...
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleFrontFaceHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ float3 optixGetWorldRayOrigin()
Returns the rayOrigin passed into optixTrace.
static __forceinline__ __device__ void optixSetPayload_22(unsigned int p)
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_5()
static __forceinline__ __device__ void optixTrace(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, OptixVisibilityMask visibilityMask, unsigned int rayFlags, unsigned int SBToffset, unsigned int SBTstride, unsigned int missSBTIndex, Payload &... payload)
Initiates a ray tracing query starting with the given traversable.
static __forceinline__ __device__ uint4 optixTexFootprint2DLod(unsigned long long tex, unsigned int texInfo, float x, float y, float level, bool coarse, unsigned int *singleMipLevel)
optixTexFootprint2DLod calculates the footprint of a corresponding 2D texture fetch (tex2DLod)
static __forceinline__ __device__ void optixTraverse(OptixTraversableHandle handle, float3 rayOrigin, float3 rayDirection, float tmin, float tmax, float rayTime, OptixVisibilityMask visibilityMask, unsigned int rayFlags, unsigned int SBToffset, unsigned int SBTstride, unsigned int missSBTIndex, Payload &... payload)
Similar to optixTrace, but does not invoke closesthit or miss. Instead, it overwrites the current out...
static __forceinline__ __device__ unsigned int optixGetPrimitiveIndex()
For a given OptixBuildInputTriangleArray the number of primitives is defined as.
static __forceinline__ __device__ const float4 * optixGetInstanceTransformFromHandle(OptixTraversableHandle handle)
Returns object-to-world transform from an OptixInstance traversable.
static __forceinline__ __device__ void optixSetPayload_3(unsigned int p)
static __forceinline__ __device__ bool optixIsBackFaceHit(unsigned int hitKind)
Function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ unsigned int optixGetTransformListSize()
Returns the number of transforms on the current transform list.
static __forceinline__ __device__ void optixSetPayload_18(unsigned int p)
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ unsigned int optixGetSbtGASIndex()
Returns the Sbt GAS index of the primitive associated with the current intersection.
static __forceinline__ __device__ unsigned int optixHitObjectGetPrimitiveIndex()
Return the primitive index associated with the current outgoing hit object.
static __forceinline__ __device__ void optixSetPayload_21(unsigned int p)
static __forceinline__ __device__ bool optixIsDisplacedMicromeshTriangleBackFaceHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ void optixSetPayload_0(unsigned int p)
Writes the 32-bit payload at the given slot index. There are up to 32 attributes available....
static __forceinline__ __device__ const OptixSRTMotionTransform * optixGetSRTMotionTransformFromHandle(OptixTraversableHandle handle)
Returns a pointer to a OptixSRTMotionTransform from its traversable handle.
static __forceinline__ __device__ unsigned int optixGetPayload_14()
static __forceinline__ __device__ CUdeviceptr optixGetSbtDataPointer()
Returns the generic memory space pointer to the data region (past the header) of the currently active...
static __forceinline__ __device__ float3 optixGetRibbonNormal(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float2 ribbonParameters)
Return ribbon normal at intersection reported by optixReportIntersection.
static __forceinline__ __device__ void optixGetMicroTriangleBarycentricsData(float2 data[3])
Returns the barycentrics of the vertices of the currently intersected micro triangle with respect to ...
static __forceinline__ __device__ void optixSetPayload_1(unsigned int p)
static __forceinline__ __device__ void optixSetPayload_13(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetPayload_21()
static __forceinline__ __device__ unsigned int optixGetPayload_8()
static __forceinline__ __device__ float optixGetCurveParameter()
Returns the curve parameter associated with the current intersection when using OptixBuildInputCurveA...
static __forceinline__ __device__ unsigned int optixGetPayload_19()
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_4()
Returns the 32-bit exception detail at slot 4.
static __forceinline__ __device__ void optixReorder(unsigned int coherenceHint, unsigned int numCoherenceHintBitsFromLSB)
Reorder the current thread using the current outgoing hit object and the coherence hint bits provided...
static __forceinline__ __device__ float3 optixTransformVectorFromWorldToObjectSpace(float3 vec)
Transforms the vector using world-to-object transformation matrix resulting from the current active t...
static __forceinline__ __device__ void optixSetPayload_15(unsigned int p)
static __forceinline__ __device__ bool optixIsTriangleFrontFaceHit()
Convenience function interpreting the result of optixGetHitKind().
static __forceinline__ __device__ unsigned int optixGetPayload_0()
Returns the 32-bit payload at the given slot index. There are up to 32 attributes available....
static __forceinline__ __device__ float3 optixTransformPointFromWorldToObjectSpace(float3 point)
Transforms the point using world-to-object transformation matrix resulting from the current active tr...
static __forceinline__ __device__ unsigned int optixGetAttribute_2()
static __forceinline__ __device__ unsigned int optixGetHitKind()
Returns the 8 bit hit kind associated with the current hit.
static __forceinline__ __device__ unsigned int optixGetPayload_28()
static __forceinline__ __device__ unsigned int optixGetPayload_7()
static __forceinline__ __device__ void optixGetTriangleVertexData(OptixTraversableHandle gas, unsigned int primIdx, unsigned int sbtGASIndex, float time, float3 data[3])
Return the object space triangle vertex positions of a given triangle in a Geometry Acceleration Stru...
static __forceinline__ __device__ float optixGetRayTmin()
Returns the tmin passed into optixTrace.
static __forceinline__ __device__ float optixGetRayTime()
Returns the rayTime passed into optixTrace.
static __forceinline__ __device__ void optixSetPayload_31(unsigned int p)
static __forceinline__ __device__ unsigned int optixGetPayload_16()
static __forceinline__ __device__ OptixTransformType optixGetTransformTypeFromHandle(OptixTraversableHandle handle)
Returns the transform type of a traversable handle from a transform list.
static __forceinline__ __device__ const float4 * optixGetInstanceInverseTransformFromHandle(OptixTraversableHandle handle)
Returns world-to-object transform from an OptixInstance traversable.
static __forceinline__ __device__ unsigned int optixGetPayload_12()
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_5()
Returns the 32-bit exception detail at slot 5.
static __forceinline__ __device__ unsigned int optixHitObjectGetAttribute_7()
static __forceinline__ __device__ unsigned int optixGetPayload_29()
static __forceinline__ __device__ OptixTraversableHandle optixGetInstanceChildFromHandle(OptixTraversableHandle handle)
Returns child traversable handle from an OptixInstance traversable.
static __forceinline__ __device__ unsigned int optixGetExceptionDetail_3()
Returns the 32-bit exception detail at slot 3.
OptixTransformType
Transform.
Definition: optix_types.h:1855
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:52
unsigned int OptixVisibilityMask
Visibility mask.
Definition: optix_types.h:80
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:77
OptixPrimitiveType
Builtin primitive types.
Definition: optix_types.h:727
OptixPayloadTypeID
Payload type identifiers.
Definition: optix_types.h:1982
OptiX public API.
OptiX public API header.
Represents a matrix motion transformation.
Definition: optix_types.h:1454
Represents an SRT motion transformation.
Definition: optix_types.h:1537
Static transform.
Definition: optix_types.h:1414