11 #ifndef __BRAY_Types__
12 #define __BRAY_Types__
37 #define ENUM_FLAG(TOKEN) BRAY_EVENT_##TOKEN = (1 << BRAY_EVENT_##TOKEN##_FLAG)
436 virtual const char *className()
const = 0;
488 #define PROPERTY_LOOKUP(NAME, STYLE, ENUM) \
489 inline ENUM BRAY##NAME(const UT_StringRef &name) \
490 { return ENUM(BRAYproperty(STYLE, name)); } \
491 inline const UT_StringHolder &BRAY##NAME(ENUM token) \
492 { return BRAYproperty(STYLE, token); } \
493 inline exint BRAY##NAME##Size(ENUM token) \
494 { return BRAYpropertySize(STYLE, token); } \
495 inline GT_Storage BRAY##NAME##Storage(ENUM token) \
496 { return BRAYpropertyStorage(STYLE, token); } \
503 #undef PROPERTY_LOOKUP
522 BRAY_API extern std::pair<BRAY_PropertyType, int>
532 const char *prefix =
"");
536 template <
typename T>
static inline constexpr
size_t BRAYmaxOptions()
539 template <>
inline constexpr
size_t
541 template <>
inline constexpr
size_t
543 template <>
inline constexpr
size_t
545 template <>
inline constexpr
size_t
547 template <>
inline constexpr
size_t
735 #define ENUM_MAPPER(TYPE, METHOD) \
736 BRAY_API extern TYPE METHOD(const UT_StringRef &name); \
737 BRAY_API extern const UT_StringHolder &METHOD(TYPE o); \
795 #define ENUM_TO_MASK(TOKEN) TOKEN = (1 << TOKEN##_ENUM)
851 template <BRAY_VexRayImport T>
static inline constexpr
size_t BRAYrayImportSize()
853 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
859 template <BRAY_VexRayImport T>
static inline constexpr
bool BRAYrayImportIsArray()
861 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
868 template <BRAY_VexLightImport T>
static inline constexpr
size_t BRAYlightImportSize()
870 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
876 template <BRAY_VexLightImport T>
static inline constexpr
bool BRAYlightImportIsArray()
878 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
884 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
885 template <> inline constexpr size_t \
886 BRAYrayImportSize<VAR>() { return SIZE; } \
887 template <> inline constexpr bool \
888 BRAYrayImportIsArray<VAR>() { return IS_ARRAY; } \
927 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
928 template <> inline constexpr size_t \
929 BRAYlightImportSize<VAR>() { return SIZE; } \
930 template <> inline constexpr bool \
931 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 >()