11 #ifndef __BRAY_Types__
12 #define __BRAY_Types__
37 #define ENUM_FLAG(TOKEN) BRAY_EVENT_##TOKEN = (1 << BRAY_EVENT_##TOKEN##_FLAG)
398 virtual const char *className()
const = 0;
450 #define PROPERTY_LOOKUP(NAME, STYLE, ENUM) \
451 inline ENUM BRAY##NAME(const UT_StringRef &name) \
452 { return ENUM(BRAYproperty(STYLE, name)); } \
453 inline const UT_StringHolder &BRAY##NAME(ENUM token) \
454 { return BRAYproperty(STYLE, token); } \
455 inline exint BRAY##NAME##Size(ENUM token) \
456 { return BRAYpropertySize(STYLE, token); } \
457 inline GT_Storage BRAY##NAME##Storage(ENUM token) \
458 { return BRAYpropertyStorage(STYLE, token); } \
465 #undef PROPERTY_LOOKUP
484 BRAY_API extern std::pair<BRAY_PropertyType, int>
494 const char *prefix =
"");
498 template <
typename T>
static inline constexpr
size_t BRAYmaxOptions()
501 template <>
inline constexpr
size_t
503 template <>
inline constexpr
size_t
505 template <>
inline constexpr
size_t
507 template <>
inline constexpr
size_t
509 template <>
inline constexpr
size_t
654 #define ENUM_MAPPER(TYPE, METHOD) \
655 BRAY_API extern TYPE METHOD(const UT_StringRef &name); \
656 BRAY_API extern const UT_StringHolder &METHOD(TYPE o); \
713 #define ENUM_TO_MASK(TOKEN) TOKEN = (1 << TOKEN##_ENUM)
766 template <BRAY_VexRayImport T>
static inline constexpr
size_t BRAYrayImportSize()
768 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
774 template <BRAY_VexRayImport T>
static inline constexpr
bool BRAYrayImportIsArray()
776 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
782 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
783 template <> inline constexpr size_t \
784 BRAYrayImportSize<VAR>() { return SIZE; } \
785 template <> inline constexpr bool \
786 BRAYrayImportIsArray<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 >()
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 >()