11 #ifndef __BRAY_Types__
12 #define __BRAY_Types__
39 #define ENUM_FLAG(TOKEN) BRAY_EVENT_##TOKEN = (1 << BRAY_EVENT_##TOKEN##_FLAG)
517 virtual const char *className()
const = 0;
580 #define PROPERTY_LOOKUP(NAME, STYLE, ENUM) \
581 inline ENUM BRAY##NAME(const UT_StringRef &name) \
582 { return ENUM(BRAYproperty(STYLE, name)); } \
583 inline const UT_StringHolder &BRAY##NAME(ENUM token) \
584 { return BRAYproperty(STYLE, token); } \
585 inline exint BRAY##NAME##Size(ENUM token) \
586 { return BRAYpropertySize(STYLE, token); } \
587 inline GT_Storage BRAY##NAME##Storage(ENUM token) \
588 { return BRAYpropertyStorage(STYLE, token); } \
595 #undef PROPERTY_LOOKUP
614 BRAY_API extern std::pair<BRAY_PropertyType, int>
624 const char *prefix =
"");
628 template <
typename T>
static inline constexpr
size_t BRAYmaxOptions()
631 template <>
inline constexpr
size_t
633 template <>
inline constexpr
size_t
635 template <>
inline constexpr
size_t
637 template <>
inline constexpr
size_t
639 template <>
inline constexpr
size_t
836 #define ENUM_MAPPER(TYPE, METHOD) \
837 BRAY_API extern TYPE METHOD(const UT_StringRef &name); \
838 BRAY_API extern const UT_StringHolder &METHOD(TYPE o); \
897 #define ENUM_TO_MASK(TOKEN) TOKEN = (1 << TOKEN##_ENUM)
954 template <BRAY_VexRayImport T>
static inline constexpr
size_t BRAYrayImportSize()
956 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
962 template <BRAY_VexRayImport T>
static inline constexpr
bool BRAYrayImportIsArray()
964 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
971 template <BRAY_VexLightImport T>
static inline constexpr
size_t BRAYlightImportSize()
973 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
979 template <BRAY_VexLightImport T>
static inline constexpr
bool BRAYlightImportIsArray()
981 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
987 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
988 template <> inline constexpr size_t \
989 BRAYrayImportSize<VAR>() { return SIZE; } \
990 template <> inline constexpr bool \
991 BRAYrayImportIsArray<VAR>() { return IS_ARRAY; } \
1032 #define INSTANTIATE(VAR, SIZE, IS_ARRAY) \
1033 template <> inline constexpr size_t \
1034 BRAYlightImportSize<VAR>() { return SIZE; } \
1035 template <> inline constexpr bool \
1036 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.
BRAY_GeoLightMaterialSyncMode
GLboolean GLboolean GLboolean GLboolean a
#define INSTANTIATE(VAR, SIZE, IS_ARRAY)
BRAY_Projection
Projection modes for rendering.
constexpr size_t BRAYmaxOptions< BRAY_CameraProperty >()
BRAY_TreatAsLightSourceOpts
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_CameraProperty >()
BRAY_API exint BRAYpropertySize(BRAY_PropertyType ty, int id)
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_PlaneProperty >()
UT_UniquePtr< BRAY_SpaceMap > BRAY_SpaceMapPtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
constexpr size_t BRAYmaxOptions< BRAY_ObjectProperty >()
GLint GLint GLsizei GLint GLenum GLenum type
BRAY_API UT_StringHolder BRAYrayVisibility(BRAY_RayVisibility mask)
BRAY_RayVisibility
Ray visibility flags.
constexpr size_t BRAYmaxOptions< BRAY_LightProperty >()
BRAY_API bool BRAYisValidMaterialProperty(BRAY_ObjectProperty p)
#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 >()
IMATH_NAMESPACE::V2f IMATH_NAMESPACE::Box2i std::string this attribute is obsolete as of OpenEXR v3 float
BRAY_API bool BRAYisValidInstanceProperty(BRAY_ObjectProperty p)
Not all properties can be specified on an instance level.
#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 >()