HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BRAY_Types.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: BRAY_Types.h (BRAY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __BRAY_Types__
12 #define __BRAY_Types__
13 
14 #include "BRAY_API.h"
15 #include <UT/UT_StringHolder.h>
16 #include <GT/GT_Types.h>
17 
18 class UT_WorkBuffer;
19 
20 enum
21 {
22  // Note - when adding event types, make sure to update ::eventType()
23  BRAY_EVENT_NEW_FLAG, // Added a new object
24  BRAY_EVENT_DEL_FLAG, // Object is being deleted
25  BRAY_EVENT_ATTRIB_P_FLAG, // P attribute changed
26  BRAY_EVENT_ATTRIB_FLAG, // Generic attribute changed
27  BRAY_EVENT_TOPOLOGY_FLAG, // Topology changed
28  BRAY_EVENT_XFORM_FLAG, // Transforms changed
29  BRAY_EVENT_CONTENTS_FLAG, // Contents changed (add/delete objects)
30  BRAY_EVENT_PROPERTIES_FLAG, // Instance properties changed
31  BRAY_EVENT_MATERIAL_FLAG, // Material has changed
32  BRAY_EVENT_TRACESET_FLAG, // Traceset has changed
33 
35 };
37 #define ENUM_FLAG(TOKEN) BRAY_EVENT_##TOKEN = (1 << BRAY_EVENT_##TOKEN##_FLAG)
38 /// Types of events that can be sent as updates to the renderer
40 {
42  ENUM_FLAG(NEW),
43  ENUM_FLAG(DEL),
44  ENUM_FLAG(ATTRIB_P),
46  ENUM_FLAG(TOPOLOGY),
47  ENUM_FLAG(XFORM),
48  ENUM_FLAG(CONTENTS),
49  ENUM_FLAG(PROPERTIES),
51  ENUM_FLAG(TRACESET),
52 };
53 #undef ENUM_FLAG
54 
55 static inline BRAY_EventType
56 operator|(BRAY_EventType a, BRAY_EventType b)
57 {
58  return BRAY_EventType(uint(a)|uint(b));
59 }
60 
61 /// Create a nice string for the event type mask
63 
64 /// Option tokens used at the "global" (scene) level
65 /// @note If you add an scene option, please update BRAY_HdUtil.C
67 {
68  BRAY_OPT_RENDERER = 0, // Name of the renderer (read-only)
69  BRAY_OPT_VERSION, // Houdini version (read-only)
70  BRAY_OPT_ENGINE, // Accelerator
71 
72  // Controls for general rendering
80  BRAY_OPT_CONVERGENCE_MODE, // branched/pathtraced integration convergence switch
81  BRAY_OPT_RR_CUTOFF_DEPTH, // russian roulette cutoff depth
82  BRAY_OPT_CONSTRAIN_MAX_ROUGH, // Constrain by maximum roughness
83  BRAY_OPT_SHADING_QUALITY_MULT, // Shading quality multiplier
84 
85  BRAY_OPT_IMAGEMODE, // Bucket rendering mode
86  BRAY_OPT_PROGRESSIVE_PASSES,// Number of progressive passes before bucket mode
87 
88  BRAY_OPT_HD_FOREGROUND, // Hydra renders in foreground (not background)
90  BRAY_OPT_IPR_INC_RANDOM, // Random seed modified each IPR render
93  BRAY_OPT_IPR_INTERACTION, // Interaction mode (see enum)
94  BRAY_OPT_IPR_BUCKETS_FOR_IMAGEFILTER, // Buckets rendered before image filters
95  BRAY_OPT_IPR_TIME_FOR_IMAGEFILTER, // Timeout before image filters run
96  BRAY_OPT_IPR_PROXY_FOR_IMAGEFILTER, // Proxy step before running filters
97 
98  // Controls for off-line rendering cache
99  BRAY_OPT_USECACHERATIO, // Whether to use the cache ratio
100  BRAY_OPT_CACHERATIO, // Amount of memory to use as cache
101  BRAY_OPT_CACHESIZE, // Absolute cache ratio
102 
103  // Object settings overrides
104  BRAY_OPT_OVERRIDE_OBJECT, // Override object settings matching this pattern
105 
106  // Control for disabled lighting
107  BRAY_OPT_OVERRIDE_LIGHTING, // Override lighting mode
108  BRAY_OPT_DISABLE_LIGHTING, // Disable all lighting (headlight)
109  BRAY_OPT_AO_SAMPLES, // Ambient occlusion samples for headlight
110  BRAY_OPT_AO_DISTANCE, // Ambient occlusion max distance for headlight
111  BRAY_OPT_AO_COLORLIMIT, // Ambient occlusion color limit threshold
112  BRAY_OPT_DEPTHCUE_COLOR, // Color for depthcue fog
113  BRAY_OPT_DEPTHCUE_ALPHA, // Alpha for depthcue fog
114  BRAY_OPT_DEPTHCUE_Z, // Distance range for depth cue fog (near,far)
115 
116  // Controls for lighting modes
117  BRAY_OPT_LIGHT_SAMPLING_MODE, // (0[Uniform], 1[Light Tree])
122 
123  // Renderer working color space
125 
129  BRAY_OPT_DICING_QUALITY_SCALE, // Multiplier for DICING_QUALITY
130  BRAY_OPT_IPR_CONTINUOUS_DICING, // IPR continuous dicing
131  BRAY_OPT_ENABLE_DOF, // Enable DOF
132  BRAY_OPT_IMAGE_BLUR, // Image motion blur
133 
134  BRAY_OPT_RESOLUTION, // Should match the data window size
137  BRAY_OPT_IMAGEFILTER, // Image filter plugins (JSON string)
140  BRAY_OPT_SAMPLEFILTER, // Sample filter plugins (JSON string)
141  BRAY_OPT_PIXELORACLE, // Pixel oracle
142 
145 
156 
158 
159  // Image properties
160  BRAY_OPT_DATAWINDOW, // Window size should match resolution
162 
163  BRAY_OPT_UNITS, // The metres per unit in world space
164 
165  // Path guiding
175 
176  // Texture baking
178  BRAY_OPT_UVUNWRAP_INFO, // Print out baking information
186 
189 };
190 
191 /// @note If you add an object property, please update BRAY_HdUtil.C
193 {
195  BRAY_OBJ_SAMPLE_FROM_STAGE, // Choose motion segments by samples on stage
196  BRAY_OBJ_GEO_VELBLUR, // (0[no blur], 1[vel blur], 2[accel blur])
199  BRAY_OBJ_BLUR_STYLE, // (0[lin], 1[rot])
200 
201  BRAY_OBJ_INSTANCE_VELBLUR, // (0[no blur], 1[vel blur], 2[accel blur])
203 
204  BRAY_OBJ_DICING_QUALITY, // <= 0[no dicing], 1[on m-p per pixel]
208  BRAY_OBJ_DICING_DEPTH_MIN, // integer (-1: unbound)
209  BRAY_OBJ_DICING_DEPTH_MAX, // integer (-1: unbound)
210 
212 
213  /// @{
214  /// @note: The order must match theBsdfBounceTypes in PBR_Types.h
220 
226 
232  /// @}
233 
234  BRAY_OBJ_VOLUME_SAMPLING, // (0[raymarch], 1[woodcock/delta])
243 
245 
250 
252 
253  BRAY_OBJ_POINT_STYLE, // Point rendering style
254  BRAY_OBJ_CURVE_STYLE, // Curve style
255  BRAY_OBJ_CURVE_BASIS, // Curve basis override
256 
257  BRAY_OBJ_TREAT_AS_LIGHTSOURCE, // (0[no], 1[yes], 2[auto])
258  BRAY_OBJ_IS_LIGHTSOURCE, // invisible, set by BRAY under the hood
259  BRAY_OBJ_VOLLIGHT_IMPORTANCE_GRID_SIZE, // int (invisible, for now)
260  BRAY_OBJ_GEOLIGHT_NUM_PERPRIM_CESAMPS, // int (invisible, for now)
261 
265 
268 
270  BRAY_OBJ_CULL_BACKFACE, // (0[off], 1[cull back], 2[cull front])
271 
273  BRAY_OBJ_RENDER_MASK, // invisible, used only by karma delegate
274  BRAY_OBJ_LPE_TAG, // string
275 
279 
282 
286 
287  // per-component variance AA settings
291 
294 
295  // UV unwrapping IDs
299 
302 };
303 
305 {
311  BRAY_CAMERA_CLIP, // real[2] (near and far)
312  BRAY_CAMERA_SHUTTER, // real[2] (open and close)
315  BRAY_CAMERA_WINDOW, // real[4] (NDC mapping window)
317  BRAY_CAMERA_TINT, // real[3]
318 
321 };
322 
324 {
326  BRAY_LIGHT_SHADER, // string
327  BRAY_LIGHT_AREA_SHAPE, // int (see BRAY_LightType)
336  BRAY_LIGHT_MIS_BIAS, // real [-1,1]
338  BRAY_LIGHT_SAMPLING_MODE, // int (see LightSamplingMode)
340  BRAY_LIGHT_CATEGORY, // string: category name
341  BRAY_LIGHT_HDRI_MAX_ISIZE, // int (max size for importance sampling tables)
342  BRAY_LIGHT_DISTANT_ANGLE, // float (angle which subtends sun)
343  BRAY_LIGHT_DIFFUSE_SCALE, // float multiplier for diffuse/sss/volume
344  BRAY_LIGHT_SPECULAR_SCALE, // float multiplier for refl/refr
345  BRAY_LIGHT_SINGLE_SIDED, // bool, single or double sided
350  BRAY_LIGHT_ILLUM_BACKGROUND, // bool illuminates background holdout
352  BRAY_LIGHT_CONTRIBUTES_CAUSTIC, // bool contributes to caustic
353  BRAY_LIGHT_SKY_LIGHT, // Type of sky light (none, sky, sky+sun, sun)
354  BRAY_LIGHT_SPREAD, // float (0,1] spread value
355 
358 };
359 
361 {
362  BRAY_PLANE_FILTER, // Pixel filter
363  BRAY_PLANE_SAMPLING, // Sample filtering (0 = average etc.)
364  BRAY_PLANE_DITHER, // Dither for quantizing to integer values
365  BRAY_PLANE_DEFAULT_VALUE, // Default value for 1-channel planes
366  BRAY_PLANE_CRYPTO_ENABLE, // Cryptomatte enable
367  BRAY_PLANE_CRYPTO_RANK, // Cryptomatte maximum rank
368  BRAY_PLANE_CRYPTO_SIDECAR, // Cryptomatte sidecar manifest file
369 
372 };
373 
375 {
381 
384 };
385 
386 /// Not all applications are able to load HDAs. If an application is able to
387 /// load HDAs, it should create a subclass of BRAY_HDALoader and instantiate a
388 /// loader. The constructor will register the class for the application and
389 /// the destructor will de-register.
391 {
392 public:
393  BRAY_HDALoader();
394  virtual ~BRAY_HDALoader();
395 
396  /// The className() is used to print out error messages in case there are
397  /// multiple HDA loaders instantiated.
398  virtual const char *className() const = 0;
399 
400  /// Return true if the HDA given by the path was loaded. It's possible the
401  /// same path may be passed multiple times, and it's up to the implementor
402  /// to optimize for this case. It's up to the implementor to print out
403  /// errors using UT_ErrorLog.
404  virtual bool loadHDA(const UT_StringHolder &path) = 0;
405 };
406 
407 /// Return the name of the renderer
409 
410 /// Look up the enum given a name.
412 {
413  switch (ty)
414  {
415  case BRAY_SCENE_PROPERTY:
419  case BRAY_LIGHT_PROPERTY:
423  case BRAY_PLANE_PROPERTY:
425  default:
426  break;
427  }
428  return 0;
429 }
431  BRAY_PropertyType ty, int id);
433  const UT_StringRef &name);
436 
437 inline bool
439 {
440  return GT_STORE_INVALID
441  != BRAYpropertyStorage(ty, id);
442 }
443 
444 inline bool
445 BRAYisValid(const std::pair<BRAY_PropertyType, int> &prop)
446 {
447  return BRAYisValid(prop.first, prop.second);
448 }
449 
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); } \
459  /* end of macro */
465 #undef PROPERTY_LOOKUP
466 
467 /// Lookup a property type by name
469 /// Look up the name of a property type by the id
471 
472 /// This function will resolve generic names to the appropriate property type
473 /// and property identifier. For example:
474 /// "plane:filter" -> {BRAY_PLANE_PROPERTY, BRAY_PLANE_FILTER}
475 /// "camera:focal" -> {BRAY_CAMERA_PROPERTY, BRAY_CAMERA_FOCAL}
476 /// "global:bucketsize" -> {BRAY_SCENE_PROPERTY, BRAY_OPT_BUCKETSIZE}
477 /// If the token doesn't map to a property, the function will return an invalid
478 /// pair (i.e. BRAYisValid(result) == false).
479 ///
480 /// If the token isn't prefixed with a property type, the @c default_style will
481 /// be used. For example, with the default of BRAY_SCENE_PROPERTY:
482 /// "bucketsize" -> { BRAY_SCENE_PROPERTY, BRAY_OPT_BUCKETSIZE }
483 /// "focal" -> {invalid_property_pair} (error - not a scene property)
484 BRAY_API extern std::pair<BRAY_PropertyType, int>
485  BRAYproperty(const char *token,
487 
488 /// Given a property type, this will compose a name string that fully qualifies
489 /// the property. This is a string that would be suitable for @c
490 /// BRAYlookupProperty(). This may return a @c nullptr.
491 BRAY_API extern const char *BRAYproperty(UT_WorkBuffer &storage,
493  int property_id,
494  const char *prefix = "");
495 
496 /// @{
497 /// Generic method to return the number of options given an enum
498 template <typename T> static inline constexpr size_t BRAYmaxOptions()
499 { SYS_UNIMPLEMENTED_TEMPLATE(T); return 0; }
500 
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
511 /// @}
512 
513 /// @{
514 /// Generic method to find the valud of the property type enum given the enum
515 template <typename T> static inline constexpr BRAY_PropertyType BRAYpropertyType()
517 
518 template <> inline constexpr BRAY_PropertyType
520 template <> inline constexpr BRAY_PropertyType
522 template <> inline constexpr BRAY_PropertyType
524 template <> inline constexpr BRAY_PropertyType
526 template <> inline constexpr BRAY_PropertyType
528 /// @}
529 
530 
532 {
533  BRAY_OVERRIDE_LIGHT_OFF, // Standard lighting
534  BRAY_OVERRIDE_LIGHT_EMISSIVE, // Only emissive objects
535  BRAY_OVERRIDE_LIGHT_HEADLIGHT, // Force: Headlight
536  BRAY_OVERRIDE_LIGHT_DOMELIGHT, // Force: Dome Light
537 };
538 
540 {
550 
553 };
554 
556 {
563 
565 };
566 
567 // Different types of user interaction in IPR
569 {
576 
578 };
579 
581 {
582  BRAY_BUCKETORDER_MIDDLE, // Render starting centered on focus point
583  BRAY_BUCKETORDER_TOP, // Render top down
584  BRAY_BUCKETORDER_BOTTOM, // Render bottom up
585  BRAY_BUCKETORDER_LEFT, // Render left to right
586  BRAY_BUCKETORDER_RIGHT, // Render right to left
587 
589 };
590 
592 {
593  BRAY_IMAGEMODE_PROGRESSIVE, // Pass over all buckets on image
594  BRAY_IMAGEMODE_BUCKET, // Finish buckets before advancing
595 
597 };
598 
599 /// Projection modes for rendering
601 {
602  BRAY_PROJ_ORTHOGRAPHIC, // orthographic projection mode
603  BRAY_PROJ_PERSPECTIVE, // perspective projection mode
604  BRAY_PROJ_CVEX_SHADER, // run a CVEX lens shader
605 
608 };
609 
611 {
612  BRAY_RAYIMPORT_P, // vector: ray origin
613  BRAY_RAYIMPORT_D, // vector: ray direction
614  BRAY_RAYIMPORT_TIME, // float: shutter time
615  BRAY_RAYIMPORT_NEAR, // float: near bias
616  BRAY_RAYIMPORT_FAR, // float: max distance
617  BRAY_RAYIMPORT_MASK, // int: intersection mask
618  BRAY_RAYIMPORT_CONTRIB, // vector: contribution
619 
620  BRAY_RAYIMPORT_HIT_ISHIT, // bool: Hit or miss
621  BRAY_RAYIMPORT_HIT_P, // vector: Hit position (in world space)
622  BRAY_RAYIMPORT_HIT_Pz, // float: Pz (in space of camera)
623  BRAY_RAYIMPORT_HIT_VELOCITY,// vector: Hit velocity (in world space)
624  BRAY_RAYIMPORT_HIT_MOTION, // vector: Motion Vector (in raster space)
625  BRAY_RAYIMPORT_HIT_STACK, // int[]: Hit stack
626  BRAY_RAYIMPORT_HIT_ELEM, // int: Hit element (raw id)
627  BRAY_RAYIMPORT_HIT_PRIMID, // int: Hit primitive id
628  BRAY_RAYIMPORT_HIT_COORD, // vector: raw parametric coords {u,v,w}
629  BRAY_RAYIMPORT_HIT_DIST, // float: Hit distance
630  BRAY_RAYIMPORT_HIT_DPDZ, // float: dPdz
631  BRAY_RAYIMPORT_HIT_N, // vector: smooth normal
632  BRAY_RAYIMPORT_HIT_Ng, // vector: geometric normal
633  BRAY_RAYIMPORT_HIT_FLAGS, // int: hit flags
634  BRAY_RAYIMPORT_HIT_OBJECTID,// int: hit object id
635  BRAY_RAYIMPORT_HIT_ISBACKFACE, // bool: is hit object backface
636  BRAY_RAYIMPORT_LEVEL, // int: ray level
637  BRAY_RAYIMPORT_VOLUME_LEVEL,// int: ray volume level
638  BRAY_RAYIMPORT_PIXEL_SAMPLES, // int: pixel samples (ie camera rays)
639  BRAY_RAYIMPORT_HD_PRIM, // int: hydra rprim id for selection
640  BRAY_RAYIMPORT_HD_INST, // int: hydra inst idx (0th level) for selection
641  BRAY_RAYIMPORT_NOFAKECAUSTICS, // bool: disable fake caustics
642 
643  BRAY_RAYIMPORT_CURVE_ATTRIB_P, // vector: interpolated curve position
644  BRAY_RAYIMPORT_CURVE_ATTRIB_WIDTH, // float: interpolated curve width
645  BRAY_RAYIMPORT_CURVE_ATTRIB_TANV, // vector: interpolated curve pos derivative
646 
647  BRAY_RAYIMPORT_ISSHADOWRAY, // bool: is the ray a shadow ray (i.e. isshadowray)
648  BRAY_RAYIMPORT_CONESPREAD, // float: ray cone half angle
649 
651  BRAY_RAYIMPORT_INVALID = BRAY_RAYIMPORT_MAX // Not a valid ray import
652 };
653 
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); \
657  /* end macro */
658 
659 ENUM_MAPPER(BRAY_LightType, BRAYlightType)
660 ENUM_MAPPER(BRAY_RenderStage, BRAYrenderStage)
661 ENUM_MAPPER(BRAY_InteractionType, BRAYinteractionType)
662 ENUM_MAPPER(BRAY_BucketOrder, BRAYbucketOrder)
663 ENUM_MAPPER(BRAY_ImageMode, BRAYimageMode)
664 ENUM_MAPPER(BRAY_Projection, BRAYprojection)
665 ENUM_MAPPER(BRAY_VexRayImport, BRAYrayImport)
666 
667 #undef ENUM_MAPPER
668 
669 /// Consistent representation of time type within BRAY
670 using BRAYtime = float;
671 
672 /// Consistent representation for material ids
674 
675 /// Invalid material id
676 static constexpr BRAYmaterialId BRAY_INVALID_MATERIAL_ID = 0;
677 
678 /// List of known LPE prefixes
680 {
684 };
685 static inline BRAY_LPEPrefix
686 operator|(BRAY_LPEPrefix a, BRAY_LPEPrefix b)
687 {
688  return BRAY_LPEPrefix(uint(a)|uint(b));
689 }
690 static inline BRAY_LPEPrefix
691 operator&(BRAY_LPEPrefix a, BRAY_LPEPrefix b)
692 {
693  return BRAY_LPEPrefix(uint(a)&uint(b));
694 }
695 
697 {
705 
708 
711 };
712 
713 #define ENUM_TO_MASK(TOKEN) TOKEN = (1 << TOKEN##_ENUM)
714 /// Ray visibility flags
716 {
718 
719  ENUM_TO_MASK(BRAY_RAY_CAMERA),
720  ENUM_TO_MASK(BRAY_RAY_DIFFUSE),
721  ENUM_TO_MASK(BRAY_RAY_REFLECT),
722  ENUM_TO_MASK(BRAY_RAY_REFRACT),
723  ENUM_TO_MASK(BRAY_RAY_VOLUME),
724  ENUM_TO_MASK(BRAY_RAY_SHADOW_REG),
725  ENUM_TO_MASK(BRAY_RAY_SHADOW_BG),
726 
727  ENUM_TO_MASK(BRAY_PROXY_CAMERA),
728  ENUM_TO_MASK(BRAY_PROXY_SHADOW),
729 
730  ENUM_TO_MASK(BRAY_GUIDE_CAMERA),
731  ENUM_TO_MASK(BRAY_GUIDE_SHADOW),
732 
733  BRAY_RAY_SHADOW = (BRAY_RAY_SHADOW_REG | BRAY_RAY_SHADOW_BG),
734  BRAY_ANY_CAMERA = (BRAY_RAY_CAMERA | BRAY_PROXY_CAMERA | BRAY_GUIDE_CAMERA),
735  BRAY_ANY_SHADOW = (BRAY_RAY_SHADOW | BRAY_PROXY_SHADOW | BRAY_GUIDE_SHADOW),
736 
737  BRAY_RAY_ALL = 0xFFFF,
738 
739  BRAY_RAY_PROXY_MASK = (BRAY_PROXY_CAMERA|BRAY_PROXY_SHADOW),
740  BRAY_RAY_GUIDE_MASK = (BRAY_GUIDE_CAMERA|BRAY_GUIDE_SHADOW),
743 };
744 #undef ENUM_TO_MASK
745 
746 static inline BRAY_RayVisibility
748 {
749  return BRAY_RayVisibility(uint(a)|uint(b));
750 }
751 static inline BRAY_RayVisibility
753 {
754  return BRAY_RayVisibility(uint(a)&uint(b));
755 }
756 static inline BRAY_RayVisibility
757 operator~(BRAY_RayVisibility a)
758 {
759  return BRAY_RayVisibility(~uint(a));
760 }
761 
763 
764 /// Generic method to return the number of components for a given import
765 /// Note that arrays types return 0 (see BRAYrayImportArray())
766 template <BRAY_VexRayImport T> static inline constexpr size_t BRAYrayImportSize()
767 {
768 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
770 #endif
771  return 0;
772 }
773 /// Generic method to return whether the import variable is array valued
774 template <BRAY_VexRayImport T> static inline constexpr bool BRAYrayImportIsArray()
775 {
776 #if !defined(__clang__) && !SYS_IS_GCC_GE(9, 2)
778 #endif
779  return false;
780 }
781 
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; } \
787  /* end of macro */
788 
789 INSTANTIATE(BRAY_RAYIMPORT_P, 3, false)
790 INSTANTIATE(BRAY_RAYIMPORT_D, 3, false)
815 
816 #undef INSTANTIATE
817 
818 // LightSamplingMode
819 // enum for BRAY_OPT_LIGHT_SAMPLING_MODE
821 {
822  BRAY_LSM_UNIFORM = 0, // uniform sampling
823  BRAY_LSM_LIGHT_TREE // light hierarchy
824 };
825 
826 #endif
BRAY_EventType
Types of events that can be sent as updates to the renderer.
Definition: BRAY_Types.h:39
BRAY_API constexpr exint BRAYpropertyCount(BRAY_PropertyType ty)
Look up the enum given a name.
Definition: BRAY_Types.h:411
GT_Storage
Definition: GT_Types.h:19
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
BRAY_OverrideLight
Definition: BRAY_Types.h:531
unsigned short uint16
Definition: SYS_Types.h:38
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
#define ENUM_TO_MASK(TOKEN)
Definition: BRAY_Types.h:713
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_LightProperty >()
Definition: BRAY_Types.h:523
float BRAYtime
Consistent representation of time type within BRAY.
Definition: BRAY_Types.h:670
getFileOption("OpenEXR:storage") storage
Definition: HDK_Image.dox:276
BRAY_API GT_Storage BRAYpropertyStorage(BRAY_PropertyType ty, int id)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
BRAY_API const UT_StringHolder & BRAYrendererName()
Return the name of the renderer.
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
BRAY_VexRayImport
Definition: BRAY_Types.h:610
BRAY_ImageMode
Definition: BRAY_Types.h:591
#define INSTANTIATE(VAR, SIZE, IS_ARRAY)
Definition: BRAY_Types.h:782
BRAY_RayVisibilityEnum
Definition: BRAY_Types.h:696
BRAY_Projection
Projection modes for rendering.
Definition: BRAY_Types.h:600
BRAY_CameraProperty
Definition: BRAY_Types.h:304
MX_GENSHADER_API const TypeDesc * MATERIAL
constexpr size_t BRAYmaxOptions< BRAY_CameraProperty >()
Definition: BRAY_Types.h:508
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_CameraProperty >()
Definition: BRAY_Types.h:525
BRAY_API exint BRAYpropertySize(BRAY_PropertyType ty, int id)
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_PlaneProperty >()
Definition: BRAY_Types.h:527
constexpr size_t BRAYmaxOptions< BRAY_ObjectProperty >()
Definition: BRAY_Types.h:504
BRAY_ObjectProperty
Definition: BRAY_Types.h:192
BRAY_API UT_StringHolder BRAYrayVisibility(BRAY_RayVisibility mask)
BRAY_RenderStage
Definition: BRAY_Types.h:555
BRAY_RayVisibility
Ray visibility flags.
Definition: BRAY_Types.h:715
BRAY_LightSamplingMode
Definition: BRAY_Types.h:820
constexpr size_t BRAYmaxOptions< BRAY_LightProperty >()
Definition: BRAY_Types.h:506
GLint GLuint mask
Definition: glcorearb.h:124
#define ENUM_MAPPER(TYPE, METHOD)
Definition: BRAY_Types.h:654
#define PROPERTY_LOOKUP(NAME, STYLE, ENUM)
Definition: BRAY_Types.h:450
GLuint const GLchar * name
Definition: glcorearb.h:786
BRAY_LightProperty
Definition: BRAY_Types.h:323
BRAY_PlaneProperty
Definition: BRAY_Types.h:360
#define ENUM_FLAG(TOKEN)
Definition: BRAY_Types.h:37
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
constexpr size_t BRAYmaxOptions< BRAY_SceneOption >()
Definition: BRAY_Types.h:502
BRAY_InteractionType
Definition: BRAY_Types.h:568
BRAY_LightType
Definition: BRAY_Types.h:539
BRAY_SceneOption
Definition: BRAY_Types.h:66
#define BRAY_API
Definition: BRAY_API.h:12
#define SYS_UNIMPLEMENTED_TEMPLATE(T)
BRAY_PropertyType
Definition: BRAY_Types.h:374
int BRAYmaterialId
Consistent representation for material ids.
Definition: BRAY_Types.h:673
constexpr size_t BRAYmaxOptions< BRAY_PlaneProperty >()
Definition: BRAY_Types.h:510
BRAY_API BRAY_PropertyType BRAYpropertyType(const UT_StringRef &name)
Lookup a property type by name.
bool BRAYisValid(BRAY_PropertyType ty, int id)
Definition: BRAY_Types.h:438
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_ObjectProperty >()
Definition: BRAY_Types.h:521
BRAY_LPEPrefix
List of known LPE prefixes.
Definition: BRAY_Types.h:679
BRAY_API const UT_StringHolder & BRAYproperty(BRAY_PropertyType ty, int id)
type
Definition: core.h:1059
BRAY_API UT_StringHolder BRAYeventType(BRAY_EventType type)
Create a nice string for the event type mask.
constexpr BRAY_PropertyType BRAYpropertyType< BRAY_SceneOption >()
Definition: BRAY_Types.h:519
unsigned int uint
Definition: SYS_Types.h:45
BRAY_BucketOrder
Definition: BRAY_Types.h:580