triro 1.3.0
A Python Ray-Mesh Intersector in OptiX
Loading...
Searching...
No Matches
sbtdef.h
Go to the documentation of this file.
1#pragma once
2
3#include "device_types.h"
4#include "optix_types.h"
5#include "type.h"
6#include <string>
7#include <tuple>
8
17
18// if the function contains such program
19using ProgramMask = int;
20// ray generation
21#define PRG_RG 1
22// intersection
23#define PRG_IS 1 << 1
24// anyhit
25#define PRG_AH 1 << 2
26// closest hit
27#define PRG_CH 1 << 3
28// miss
29#define PRG_MS 1 << 4
30// direct callable
31#define PRG_DC 1 << 5
32// continuation callable
33#define PRG_CC 1 << 6
34// exception
35#define PRG_EX 1 << 7
36
37const std::tuple<std::string, ProgramMask> programInfos[] = {
38 {"intersectsAny", PRG_RG | PRG_AH | PRG_MS},
39 {"intersectsFirst", PRG_RG | PRG_CH | PRG_MS},
40 {"intersectsClosest", PRG_RG | PRG_CH | PRG_MS},
41 {"intersectsCount", PRG_RG | PRG_AH},
42 {"intersectsLocation", PRG_RG | PRG_AH}};
43
44template <typename T> struct SBTRecord {
46 OPTIX_SBT_RECORD_ALIGNMENT) char header[OPTIX_SBT_RECORD_HEADER_SIZE];
48};
49
const std::tuple< std::string, ProgramMask > programInfos[]
Definition sbtdef.h:37
int ProgramMask
Definition sbtdef.h:19
#define PRG_RG
Definition sbtdef.h:21
#define PRG_AH
Definition sbtdef.h:25
#define PRG_MS
Definition sbtdef.h:29
#define PRG_CH
Definition sbtdef.h:27
SBTType
Definition sbtdef.h:9
@ INTERSECTS_LOCATION
Definition sbtdef.h:14
@ count
Definition sbtdef.h:15
@ INTERSECTS_ANY
Definition sbtdef.h:10
@ INTERSECTS_FIRST
Definition sbtdef.h:11
@ INTERSECTS_COUNT
Definition sbtdef.h:13
@ INTERSECTS_CLOSEST
Definition sbtdef.h:12
__align__(OPTIX_SBT_RECORD_ALIGNMENT) char header[OPTIX_SBT_RECORD_HEADER_SIZE]