18#ifndef OPTIX_OPTIX_DEVICE_H
19#define OPTIX_OPTIX_DEVICE_H
21#if defined( __cplusplus ) && ( __cplusplus < 201103L ) && !defined( _WIN32 )
22#error Device code for OptiX requires at least C++11. Consider adding "--std c++11" to the nvcc command-line.
51template <
typename... Payload>
59 unsigned int rayFlags,
60 unsigned int SBToffset,
61 unsigned int SBTstride,
62 unsigned int missSBTIndex,
63 Payload&... payload );
84template <
typename... Payload>
92 unsigned int rayFlags,
93 unsigned int SBToffset,
94 unsigned int SBTstride,
95 unsigned int missSBTIndex,
96 Payload&... payload );
115template <
typename... Payload>
124 unsigned int rayFlags,
125 unsigned int SBToffset,
126 unsigned int SBTstride,
127 unsigned int missSBTIndex,
128 Payload&... payload );
150template <
typename... Payload>
159 unsigned int rayFlags,
160 unsigned int SBToffset,
161 unsigned int SBTstride,
162 unsigned int missSBTIndex,
163 Payload&... payload );
175static __forceinline__ __device__
void optixReorder(
unsigned int coherenceHint,
unsigned int numCoherenceHintBitsFromLSB );
190template <
typename... Payload>
191static __forceinline__ __device__
void optixInvoke( Payload&... payload );
202template <
typename... Payload>
223template <
typename... RegAttributes>
230 unsigned int SBToffset,
231 unsigned int SBTstride,
232 unsigned int instIdx,
233 unsigned int sbtGASIdx,
234 unsigned int primIdx,
235 unsigned int hitKind,
236 RegAttributes... regAttributes );
260template <
typename... RegAttributes>
267 unsigned int SBToffset,
268 unsigned int SBTstride,
269 unsigned int instIdx,
271 unsigned int numTransforms,
272 unsigned int sbtGASIdx,
273 unsigned int primIdx,
274 unsigned int hitKind,
275 RegAttributes... regAttributes );
297template <
typename... RegAttributes>
304 unsigned int sbtRecordIndex,
305 unsigned int instIdx,
307 unsigned int numTransforms,
308 unsigned int sbtGASIdx,
309 unsigned int primIdx,
310 unsigned int hitKind,
311 RegAttributes... regAttributes );
904static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1 );
911static __forceinline__ __device__
bool optixReportIntersection(
float hitT,
unsigned int hitKind,
unsigned int a0,
unsigned int a1,
unsigned int a2 );
919 unsigned int hitKind,
931 unsigned int hitKind,
944 unsigned int hitKind,
958 unsigned int hitKind,
973 unsigned int hitKind,
1267static __forceinline__ __device__
void optixThrowException(
int exceptionCode,
unsigned int exceptionDetail0 );
1275 unsigned int exceptionDetail0,
1276 unsigned int exceptionDetail1 );
1284 unsigned int exceptionDetail0,
1285 unsigned int exceptionDetail1,
1286 unsigned int exceptionDetail2 );
1294 unsigned int exceptionDetail0,
1295 unsigned int exceptionDetail1,
1296 unsigned int exceptionDetail2,
1297 unsigned int exceptionDetail3 );
1305 unsigned int exceptionDetail0,
1306 unsigned int exceptionDetail1,
1307 unsigned int exceptionDetail2,
1308 unsigned int exceptionDetail3,
1309 unsigned int exceptionDetail4 );
1317 unsigned int exceptionDetail0,
1318 unsigned int exceptionDetail1,
1319 unsigned int exceptionDetail2,
1320 unsigned int exceptionDetail3,
1321 unsigned int exceptionDetail4,
1322 unsigned int exceptionDetail5 );
1331 unsigned int exceptionDetail0,
1332 unsigned int exceptionDetail1,
1333 unsigned int exceptionDetail2,
1334 unsigned int exceptionDetail3,
1335 unsigned int exceptionDetail4,
1336 unsigned int exceptionDetail5,
1337 unsigned int exceptionDetail6 );
1345 unsigned int exceptionDetail0,
1346 unsigned int exceptionDetail1,
1347 unsigned int exceptionDetail2,
1348 unsigned int exceptionDetail3,
1349 unsigned int exceptionDetail4,
1350 unsigned int exceptionDetail5,
1351 unsigned int exceptionDetail6,
1352 unsigned int exceptionDetail7 );
1452template <
typename ReturnT,
typename... ArgTypes>
1453static __forceinline__ __device__ ReturnT
optixDirectCall(
unsigned int sbtIndex, ArgTypes... args );
1478template <
typename ReturnT,
typename... ArgTypes>
1546static __forceinline__ __device__ uint4
optixTexFootprint2D(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
unsigned int* singleMipLevel );
1559static __forceinline__ __device__ uint4
1560optixTexFootprint2DLod(
unsigned long long tex,
unsigned int texInfo,
float x,
float y,
float level,
bool coarse,
unsigned int* singleMipLevel );
1577 unsigned int texInfo,
1585 unsigned int* singleMipLevel );
1589#define __OPTIX_INCLUDE_INTERNAL_HEADERS__
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 __device__ __forceinline__ CUdeviceptr optixGetGASPointerFromHandle(OptixTraversableHandle handle)
Returns a pointer to the geometry acceleration structure from its traversable handle.
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:1850
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:43
unsigned int OptixVisibilityMask
Visibility mask.
Definition: optix_types.h:71
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:68
OptixPrimitiveType
Builtin primitive types.
Definition: optix_types.h:721
OptixPayloadTypeID
Payload type identifiers.
Definition: optix_types.h:1977