11 #ifndef __BRAY_Types__
12 #define __BRAY_Types__
37 #define ENUM_FLAG(TOKEN) BRAY_EVENT_##TOKEN = (1 << BRAY_EVENT_##TOKEN##_FLAG)
430 virtual const char *className()
const = 0;
482 #define PROPERTY_LOOKUP(NAME, STYLE, ENUM) \
483 inline ENUM BRAY##NAME(const UT_StringRef &name) \
484 { return ENUM(BRAYproperty(STYLE, name)); } \
485 inline const UT_StringHolder &BRAY##NAME(ENUM token) \
486 { return BRAYproperty(STYLE, token); } \
487 inline exint BRAY##NAME##Size(ENUM token) \
488 { return BRAYpropertySize(STYLE, token); } \
489 inline GT_Storage BRAY##NAME##Storage(ENUM token) \
490 { return BRAYpropertyStorage(STYLE, token); } \
497 #undef PROPERTY_LOOKUP
516 BRAY_API extern std::pair<BRAY_PropertyType, int>
526 const char *prefix =
"");
530 template <
typename T>
static inline constexpr
size_t BRAYmaxOptions()
533 template <>
inline constexpr
size_t
535 template <>
inline constexpr
size_t
537 template <>
inline constexpr
size_t
539 template <>
inline constexpr
size_t
541 template <>
inline constexpr
size_t
729 #define ENUM_MAPPER(TYPE, METHOD) \
730 BRAY_API extern TYPE METHOD(const UT_StringRef &name); \
731 BRAY_API extern const UT_StringHolder &METHOD(TYPE o); \
789 #define ENUM_TO_MASK(TOKEN) TOKEN = (1 << TOKEN##_ENUM)
845 template <BRAY_VexRayImport T>
static inline constexpr
size_t BRAYrayImportSize()
847 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
853 template <BRAY_VexRayImport T>
static inline constexpr
bool BRAYrayImportIsArray()
855 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
862 template <BRAY_VexLightImport T>
static inline constexpr
size_t BRAYlightImportSize()
864 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
870 template <BRAY_VexLightImport T>
static inline constexpr
bool BRAYlightImportIsArray()
872 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
878 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
879 template <> inline constexpr size_t \
880 BRAYrayImportSize<VAR>() { return SIZE; } \
881 template <> inline constexpr bool \
882 BRAYrayImportIsArray<VAR>() { return IS_ARRAY; } \
921 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
922 template <> inline constexpr size_t \
923 BRAYlightImportSize<VAR>() { return SIZE; } \
924 template <> inline constexpr bool \
925 BRAYlightImportIsArray<VAR>() { return IS_ARRAY; } \
BRAY_EventType
Types of events that can be sent as updates to the renderer.
BRAY_API constexpr exint BRAYpropertyCount(BRAY_PropertyType ty)
Look up the enum given a name.
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
#define ENUM_TO_MASK(TOKEN)
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_LightProperty >()
float BRAYtime
Consistent representation of time type within BRAY.
getFileOption("OpenEXR:storage") storage
BRAY_API GT_Storage BRAYpropertyStorage(BRAY_PropertyType ty, int id)
GLsizei const GLchar *const * path
BRAY_API const UT_StringHolder & BRAYrendererName()
Return the name of the renderer.
GLboolean GLboolean GLboolean GLboolean a
#define INSTANTIATE(VAR, SIZE, IS_ARRAY)
BRAY_Projection
Projection modes for rendering.
MX_GENSHADER_API const TypeDesc * MATERIAL
constexpr size_t BRAYmaxOptions< BRAY_CameraProperty >()
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_CameraProperty >()
BRAY_API exint BRAYpropertySize(BRAY_PropertyType ty, int id)
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_PlaneProperty >()
constexpr size_t BRAYmaxOptions< BRAY_ObjectProperty >()
IMATH_NAMESPACE::V2f float
BRAY_API UT_StringHolder BRAYrayVisibility(BRAY_RayVisibility mask)
BRAY_RayVisibility
Ray visibility flags.
constexpr size_t BRAYmaxOptions< BRAY_LightProperty >()
#define ENUM_MAPPER(TYPE, METHOD)
#define PROPERTY_LOOKUP(NAME, STYLE, ENUM)
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
constexpr size_t BRAYmaxOptions< BRAY_SceneOption >()
#define SYS_UNIMPLEMENTED_TEMPLATE(T)
int BRAYmaterialId
Consistent representation for material ids.
constexpr size_t BRAYmaxOptions< BRAY_PlaneProperty >()
BRAY_API BRAY_PropertyType BRAYpropertyType(const UT_StringRef &name)
Lookup a property type by name.
bool BRAYisValid(BRAY_PropertyType ty, int id)
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_ObjectProperty >()
BRAY_LPEPrefix
List of known LPE prefixes.
BRAY_API const UT_StringHolder & BRAYproperty(BRAY_PropertyType ty, int id)
BRAY_API UT_StringHolder BRAYeventType(BRAY_EventType type)
Create a nice string for the event type mask.
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_SceneOption >()