HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RU_PixelFunctions.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: RU_PixelFunctions.h
7  *
8  * COMMENTS:
9  * Defines simple functions on a pixel value that may be chained together.
10  */
11 #ifndef RU_PixelFunctions_h
12 #define RU_PixelFunctions_h
13 
14 #include "RU_API.h"
15 #include <SYS/SYS_Math.h>
16 #include <UT/UT_Matrix4.h>
17 #include <PXL/PXL_Lookup.h>
18 #include <CL/CL_Clip.h>
19 #include "RU_PixelFunction.h"
20 
21 class UT_ComputeGPU;
22 
23 // ----------------------------------------------------------------------
24 // Simple scalar functions.
25 
27 {
28 public:
29  RU_AddFunc(float addend) : myAddend(addend) {}
30 protected:
31  static float add(RU_PixelFunction *pf, float val, int)
32  { return val +((RU_AddFunc*)pf)->myAddend; }
33 
34  RUPixelFunc getPixelFunction() const override { return add; }
35  void getPixelShader(UT_String &frag_shader) override;
36 
37  float myAddend;
38 };
39 
40 
42 {
43 public:
44  RU_MultFunc(float fact) : myFactor(fact) {}
45 protected:
46  static float mult(RU_PixelFunction *pf, float val, int)
47  { return val * ((RU_MultFunc*)pf)->myFactor; }
48 
49  RUPixelFunc getPixelFunction() const override { return mult; }
50  void getPixelShader(UT_String &frag_shader) override;
51 
52  float myFactor;
53 };
54 
56 {
57 public:
58  RU_MAddFunc(float fact, float add);
59  RU_MAddFunc(float fact[4], float add[4]);
60 
61 protected:
62  static float madd(RU_PixelFunction *pf, float val, int comp)
63  { return val * ((RU_MAddFunc*)pf)->myFactor[comp]
64  + ((RU_MAddFunc*)pf)->myAddend[comp]; }
65 
66  RUPixelFunc getPixelFunction() const override { return madd; }
67  void getPixelShader(UT_String &frag_shader) override;
68 
69  bool eachComponentDifferent() const override
70  { return myCompSep; }
71 
72  bool myCompSep;
73  float myFactor[4], myAddend[4];
74 };
75 
77 {
78 public:
79  RU_ScaleFunc(float scale, float pivot)
80  : myScale(scale), myPivot(pivot) {}
81 
82 protected:
83  static float scale(RU_PixelFunction *pf, float val, int )
84  { return (val - ((RU_ScaleFunc*)pf)->myPivot)
85  * ((RU_ScaleFunc*)pf)->myScale
86  + ((RU_ScaleFunc*)pf)->myPivot; }
87 
88  RUPixelFunc getPixelFunction() const override { return scale; }
89  void getPixelShader(UT_String &frag_shader) override;
90 
91  float myScale, myPivot;
92 };
93 
94 
96 {
97 public:
98  RU_GammaFunc(float g) : myCompSep(false)
99  { float ig = 1.0f / g; myInvGamma[0] = myInvGamma[1] =
100  myInvGamma[2] = myInvGamma[3] = ig; }
101 
102  RU_GammaFunc(float r, float g, float b, float w)
103  : myCompSep(true)
104  { myInvGamma[0] = 1.0f / r; myInvGamma[1] = 1.0f / g;
105  myInvGamma[2] = 1.0f/ b; myInvGamma[3] = 1.0f / w; }
106 protected:
107  static float gamma(RU_PixelFunction *pf, float val, int);
108  static float gamma(float val, float g);
109 
110  bool eachComponentDifferent() const override
111  { return myCompSep; }
112  RUPixelFunc getPixelFunction() const override
113  { return gamma; }
114  void getPixelShader(UT_String &frag_shader) override;
115 
116  float myInvGamma[4];
117  bool myCompSep;
118 };
119 
120 
122 {
123 public:
124 
125  RU_LimitFunc(bool lower, float lval, bool upper, float uval, bool clamp)
126  : myLClip(lower),
127  myUClip(upper),
128  myClamp(clamp),
129  myLLimit(lval),
130  myULimit(uval) {}
131 
132 protected:
133  static float limit(RU_PixelFunction *pf, float val, int);
134 
135  RUPixelFunc getPixelFunction() const override { return limit; }
136  void getPixelShader(UT_String &frag_shader) override;
137 
138  unsigned char myLClip:1,
139  myUClip:1,
140  myClamp:1;
141  float myLLimit, myULimit;
142 };
143 
144 
146 {
147 public:
148  RU_QuantizeFunc(float step, float offset)
149  : myStep(step), myOffset(offset) {}
150 
151 protected:
152  static float quantize(RU_PixelFunction *pf, float val, int);
153  RUPixelFunc getPixelFunction() const override { return quantize; }
154  void getPixelShader(UT_String &frag_shader) override;
155 
156  float myStep, myOffset;
157 };
158 
159 // ------------------------------------------------------------------------
160 // Vector based functions.
161 
163 {
164 public:
166 
167 protected:
168  static void luminance(RU_PixelFunction *f, float **vals,
169  const bool *scope);
170 
171  bool needAllComponents() const override { return true; }
172  RUVectorFunc getVectorFunction() const override { return luminance; }
173  void getPixelShader(UT_String &frag_shader) override;
174 };
175 
177 {
178 public:
180 
181 protected:
182  static void luminance(RU_PixelFunction *f, float **vals,
183  const bool *scope);
184 
185  bool needAllComponents() const override { return true; }
186  RUVectorFunc getVectorFunction() const override { return luminance; }
187  void getPixelShader(UT_String &frag_shader) override;
188 };
189 
190 
192 {
193 public:
195 
196 protected:
197  static void hue(RU_PixelFunction *f, float **vals,
198  const bool *scope);
199 
200  bool needAllComponents() const override { return true; }
201  RUVectorFunc getVectorFunction() const override { return hue; }
202  void getPixelShader(UT_String &frag_shader) override;
203 
204 };
205 
206 
208 {
209 public:
211 
212 protected:
213  static void saturation(RU_PixelFunction *f, float **vals,
214  const bool *scope);
215 
216  bool needAllComponents() const override { return true; }
218  { return saturation; }
219  void getPixelShader(UT_String &frag_shader) override;
220 };
221 
222 
224 {
225 public:
227 
228 protected:
229  static void maxfunc(RU_PixelFunction *f, float **vals,
230  const bool *scope);
231 
232  bool needAllComponents() const override { return true; }
233  RUVectorFunc getVectorFunction() const override { return maxfunc; }
234  void getPixelShader(UT_String &frag_shader) override;
235 };
236 
237 
239 {
240 public:
242 
243 protected:
244  static void minfunc(RU_PixelFunction *f, float **vals,
245  const bool *scope);
246 
247  bool needAllComponents() const override { return true; }
248  RUVectorFunc getVectorFunction() const override { return minfunc; }
249  void getPixelShader(UT_String &frag_shader) override;
250 };
251 
252 
254 {
255 public:
257 
258 protected:
259  static void average(RU_PixelFunction *f, float **vals,
260  const bool *scope);
261 
262  bool needAllComponents() const override { return true; }
263  RUVectorFunc getVectorFunction() const override { return average; }
264  void getPixelShader(UT_String &frag_shader) override;
265 };
266 
267 
269 {
270 public:
272 
273 protected:
274  static void length(RU_PixelFunction *f, float **vals,
275  const bool *scope);
276 
277  bool needAllComponents() const override { return true; }
278  RUVectorFunc getVectorFunction() const override { return length; }
279  void getPixelShader(UT_String &frag_shader) override;
280 };
281 
283 {
284 public:
285  RU_ComponentFunc(int comp) : myComponent(comp) {}
286 
287 protected:
288  static void component(RU_PixelFunction *f, float **vals,
289  const bool *scope);
290 
291  bool needAllComponents() const override { return true; }
292  RUVectorFunc getVectorFunction() const override { return component; }
293  void getPixelShader(UT_String &frag_shader) override;
294 
296 };
297 
298 
300 {
301 public:
303 
304 protected:
305  static void normalize(RU_PixelFunction *f, float **vals,
306  const bool *scope);
307 
308  bool needAllComponents() const override { return true; }
309  RUVectorFunc getVectorFunction() const override { return normalize; }
310  void getPixelShader(UT_String &frag_shader) override;
311 };
312 
314 {
315 public:
319  ADJUST_HSV
320  };
321 
322  RU_HSVConvertFunc(RU_HSVConvertOp op, float hues = 0.0f,
323  float *sat = 0, float *val = 0, bool maintain_lum = true)
324  : myHSVOp(op),
325  myHueShift(hues),
326  mySatScale(sat?sat[0]:1.0f),
327  mySatShift(sat?sat[1]:0.0f),
328  myValueScale(val?val[0]:1.0f),
329  myValueShift(val?val[1]:0.0f),
330  myMaintainLum(maintain_lum) {}
331 
332 protected:
333  static void toHSV(RU_PixelFunction *f, float **vals,
334  const bool *scope);
335  static void fromHSV(RU_PixelFunction *f, float **vals,
336  const bool *scope);
337  static void adjustHSV(RU_PixelFunction *f, float **vals,
338  const bool *scope);
339 
340  bool needAllComponents() const override { return true; }
342  { if(myHSVOp==CONVERT_TO_HSV) return toHSV;
343  if(myHSVOp==CONVERT_TO_RGB) return fromHSV;
344  return adjustHSV; }
345  void getPixelShader(UT_String &frag_shader) override;
346 
348  float myHueShift;
349  float mySatScale, mySatShift;
350  float myValueScale, myValueShift;
352 };
353 
355 {
356 public:
357  RU_VectorFunc(const UT_Matrix4 &matrix) : myMatrix(matrix) {}
358 
359 protected:
360  static void matrixmult(RU_PixelFunction *f, float **vals,
361  const bool *scope);
362 
363  bool needAllComponents() const override { return true; }
365  { return matrixmult; }
366  void getPixelShader(UT_String &frag_shader) override;
367 
369 };
370 
371 
373 {
374 public:
375  RU_LookupClipFunc(const CL_Clip *clip) : myClip(clip) {}
376 protected:
377  static float lookup(RU_PixelFunction *pf, float val, int);
378  static void vlookup(RU_PixelFunction *f, float **vals,
379  const bool *scope);
380 
381  bool needAllComponents() const override
382  { return myClip->getNumTracks() > 1; }
383  RUVectorFunc getVectorFunction() const override { return vlookup; }
384  RUPixelFunc getPixelFunction() const override { return lookup; }
385  void getPixelShader(UT_String &frag_shader) override;
386 
387  const CL_Clip *myClip;
388 };
389 
391 {
392 public:
393  RU_LookupTableFunc(PXL_Lookup *table) : myTable(table) {}
394 
395  ~RU_LookupTableFunc() override { delete myTable; }
396 
397 protected:
398  static float lookup(RU_PixelFunction *pf, float val, int);
399  static void vlookup(RU_PixelFunction *f, float **vals,
400  const bool *scope);
401 
402  bool eachComponentDifferent() const override
403  { return myTable->getNumChannels() > 1; }
404  bool needAllComponents() const override
405  { return myTable->is3DLUT(); }
406 
407  RUPixelFunc getPixelFunction() const override { return lookup; }
408  RUVectorFunc getVectorFunction() const override { return vlookup; }
409 
411 };
412 
413 
414 // Mathematical functions.
415 
417 {
418 public:
420 protected:
421  static float absolute(RU_PixelFunction *pf, float val, int);
422  RUPixelFunc getPixelFunction() const override { return absolute; }
423  void getPixelShader(UT_String &frag_shader) override;
424 };
425 
427 {
428 public:
430 protected:
431  static float sign(RU_PixelFunction *pf, float val, int);
432  RUPixelFunc getPixelFunction() const override { return sign; }
433  void getPixelShader(UT_String &frag_shader) override;
434 };
435 
437 {
438 public:
439  RU_PowerFunc(float exponent) : myExponent(exponent) {}
440 protected:
441  static float power(RU_PixelFunction *pf, float val, int);
442  RUPixelFunc getPixelFunction() const override { return power; }
443  void getPixelShader(UT_String &frag_shader) override;
444  float myExponent;
445 };
446 
448 {
449 public:
450  RU_RaiseFunc(float base) : myBase(base) {}
451 protected:
452  static float raise(RU_PixelFunction *pf, float val, int);
453  RUPixelFunc getPixelFunction() const override { return raise; }
454  void getPixelShader(UT_String &frag_shader) override;
455  float myBase;
456 };
457 
459 {
460 public:
461  RU_LogFunc(float base, bool replace, float value);
462 protected:
463  static float logarithm(RU_PixelFunction *pf, float val, int);
464  RUPixelFunc getPixelFunction() const override { return logarithm; }
465  void getPixelShader(UT_String &frag_shader) override;
466  float myBase;
468  float myValue;
469 };
470 
472 {
473 public:
474  RU_SinFunc(float scale, float shift) : myScale(scale), myShift(shift) {}
475 protected:
476  static float sinfunc(RU_PixelFunction *pf, float val, int);
477  RUPixelFunc getPixelFunction() const override { return sinfunc; }
478  void getPixelShader(UT_String &frag_shader) override;
479  float myScale;
480  float myShift;
481 };
482 
484 {
485 public:
486  RU_SinhFunc(float scale) : myScale(scale) {}
487 protected:
488  static float sinhfunc(RU_PixelFunction *pf, float val, int);
489  RUPixelFunc getPixelFunction() const override { return sinhfunc; }
490  void getPixelShader(UT_String &frag_shader) override;
491  float myScale;
492 };
493 
495 {
496 public:
497  RU_CoshFunc(float scale) : myScale(scale) {}
498 protected:
499  static float coshfunc(RU_PixelFunction *pf, float val, int);
500  RUPixelFunc getPixelFunction() const override { return coshfunc; }
501  void getPixelShader(UT_String &frag_shader) override;
502  float myScale;
503 };
504 
506 {
507 public:
508  RU_TanFunc(float scale, bool rep, float v)
509  : myScale(scale), myDoReplace(rep), myValue(v) {}
510 protected:
511  static float tanfunc(RU_PixelFunction *pf, float val, int);
512  RUPixelFunc getPixelFunction() const override { return tanfunc; }
513  void getPixelShader(UT_String &frag_shader) override;
514  float myScale;
516  float myValue;
517 };
518 
520 {
521 public:
522  RU_TanhFunc(float scale) : myScale(scale) {}
523 protected:
524  static float tanhfunc(RU_PixelFunction *pf, float val, int);
525  RUPixelFunc getPixelFunction() const override { return tanhfunc; }
526  void getPixelShader(UT_String &frag_shader) override;
527  float myScale;
528 };
529 
531 {
532 public:
533  RU_AtanFunc(float scale) : myScale(scale) {}
534 protected:
535  static float atanfunc(RU_PixelFunction *pf, float val, int);
536  RUPixelFunc getPixelFunction() const override { return atanfunc; }
537  void getPixelShader(UT_String &frag_shader) override;
538  float myScale;
539 };
540 
542 {
543 public:
544  RU_AsinFunc(float scale, bool rep, float v)
545  : myScale(scale), myDoReplace(rep), myValue(v) {}
546 protected:
547  static float asinfunc(RU_PixelFunction *pf, float val, int);
548  RUPixelFunc getPixelFunction() const override { return asinfunc; }
549  void getPixelShader(UT_String &frag_shader) override;
550  float myScale;
552  float myValue;
553 };
554 
556 {
557 public:
558  RU_AcosFunc(float scale, bool rep, float v)
559  : myScale(scale), myDoReplace(rep), myValue(v) {}
560 protected:
561  static float acosfunc(RU_PixelFunction *pf, float val, int);
562  RUPixelFunc getPixelFunction() const override { return acosfunc; }
563  void getPixelShader(UT_String &frag_shader) override;
564  float myScale;
566  float myValue;
567 };
568 
570 {
571 public:
573 protected:
574  static float negate(RU_PixelFunction *pf, float val, int);
575  RUPixelFunc getPixelFunction() const override { return negate; }
576  void getPixelShader(UT_String &frag_shader) override;
577 };
578 
580 {
581 public:
582  RU_InvertFunc(bool rep, float v) : myDoReplace(rep), myValue(v) {}
583 protected:
584  static float invert(RU_PixelFunction *pf, float val, int);
585  RUPixelFunc getPixelFunction() const override { return invert; }
586  void getPixelShader(UT_String &frag_shader) override;
588  float myValue;
589 };
590 
592 {
593 public:
595 protected:
596  static float floorfunc(RU_PixelFunction *pf, float val, int);
597  RUPixelFunc getPixelFunction() const override { return floorfunc; }
598  void getPixelShader(UT_String &frag_shader) override;
599 };
600 
602 {
603 public:
605 protected:
606  static float ceilfunc(RU_PixelFunction *pf, float val, int);
607  RUPixelFunc getPixelFunction() const override { return ceilfunc; }
608  void getPixelShader(UT_String &frag_shader) override;
609 };
610 
612 {
613 public:
615 protected:
616  static float roundfunc(RU_PixelFunction *pf, float val, int);
617  RUPixelFunc getPixelFunction() const override { return roundfunc; }
618  void getPixelShader(UT_String &frag_shader) override;
619 };
620 
622 {
623 public:
624  /// passing all data down, rather than precomputing MAdds, so that we can
625  /// correctly handle the degenerate cases of 0-width input ranges.
626  /// @param effect frame scope effect,
627  /// applied by the ctor to the ranges but not the gammas
628  /// (caller should apply it to the gammas)
629  RU_LevelsFunc(float effect,
630  float global_in_range_min, float global_in_range_max,
631  float global_out_range_min, float global_out_range_max,
632  float global_gamma,
633  float comp_in_range_min[4], float comp_in_range_max[4],
634  float comp_out_range_min[4], float comp_out_range_max[4],
635  float comp_gamma[4]);
636 
637  RU_LevelsFunc(float effect,
638  float global_in_range_min, float global_in_range_max,
639  float global_out_range_min, float global_out_range_max,
640  float global_gamma,
641  float comp_in_range_min, float comp_in_range_max,
642  float comp_out_range_min, float comp_out_range_max,
643  float comp_gamma);
644 
645 protected:
646  /// for the usual case, MAdd, gamma, MAdd, gamma
647  static float fastLevels(RU_PixelFunction *pf, float val, int);
648 
649  /// handles degenerate input level ranges
650  static float safeLevels(RU_PixelFunction *pf, float val, int);
651  float safeLevels(float val, int);
652 
653  static void colourMap(float const effect,
654  const float from_min, const float from_max,
655  const float to_min, const float to_max,
656  float& factor, float& addend);
657 
658 
659  RUPixelFunc getPixelFunction() const override
660  { return myLevelsFunc; }
661  void getPixelShader(UT_String &frag_shader) override;
662 
664 
665  // for fast levels
668  float myFactor[4];
669  float myAddend[4];
670 
671  // for safe levels
676  float myCompInRangeMin[4];
677  float myCompInRangeMax[4];
678  float myCompOutRangeMin[4];
679  float myCompOutRangeMax[4];
680 
682 };
683 
684 #endif
RU_ScaleFunc(float scale, float pivot)
RUPixelFunc getPixelFunction() const override
bool needAllComponents() const override
RU_GammaFunc(float g)
static float mult(RU_PixelFunction *pf, float val, int)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
RU_LookupTableFunc(PXL_Lookup *table)
std::string upper(string_view a)
Return an all-upper case version of a (locale-independent).
Definition: strutil.h:402
RU_SinhFunc(float scale)
RU_PowerFunc(float exponent)
RUVectorFunc getVectorFunction() const override
GLenum clamp
Definition: glcorearb.h:1234
RU_AcosFunc(float scale, bool rep, float v)
GLboolean invert
Definition: glcorearb.h:549
RUPixelFunc getPixelFunction() const override
bool eachComponentDifferent() const override
const GLdouble * v
Definition: glcorearb.h:837
RUPixelFunc getPixelFunction() const override
bool needAllComponents() const override
GLboolean GLboolean g
Definition: glcorearb.h:1222
int myStep
Definition: GT_CurveEval.h:264
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
#define RU_API
Definition: RU_API.h:10
RUPixelFunc getPixelFunction() const override
~RU_LookupTableFunc() override
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
RUPixelFunc getPixelFunction() const override
RU_LookupClipFunc(const CL_Clip *clip)
RU_GammaFunc(float r, float g, float b, float w)
RU_CoshFunc(float scale)
RUPixelFunc myLevelsFunc
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
bool needAllComponents() const override
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
static float scale(RU_PixelFunction *pf, float val, int)
RUPixelFunc getPixelFunction() const override
GA_API const UT_StringHolder scale
RUPixelFunc getPixelFunction() const override
GLfloat f
Definition: glcorearb.h:1926
GLintptr offset
Definition: glcorearb.h:665
RUPixelFunc getPixelFunction() const override
RU_ComponentFunc(int comp)
bool needAllComponents() const override
RU_AsinFunc(float scale, bool rep, float v)
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
RUVectorFunc getVectorFunction() const override
UT_Matrix4 myMatrix
RUPixelFunc getPixelFunction() const override
OIIO_FORCEINLINE OIIO_HOSTDEVICE float madd(float a, float b, float c)
Fused multiply and add: (a*b + c)
Definition: fmath.h:413
RU_VectorFunc(const UT_Matrix4 &matrix)
RUPixelFunc getPixelFunction() const override
RU_TanhFunc(float scale)
RUPixelFunc getPixelFunction() const override
IMATH_HOSTDEVICE constexpr int sign(T a) IMATH_NOEXCEPT
Definition: ImathFun.h:33
RUPixelFunc getPixelFunction() const override
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
RUPixelFunc getPixelFunction() const override
GLenum GLenum GLsizei void * table
Definition: glad.h:5129
const CL_Clip * myClip
RU_SinFunc(float scale, float shift)
RUVectorFunc getVectorFunction() const override
RU_QuantizeFunc(float step, float offset)
bool needAllComponents() const override
bool needAllComponents() const override
RU_HSVConvertFunc(RU_HSVConvertOp op, float hues=0.0f, float *sat=0, float *val=0, bool maintain_lum=true)
bool needAllComponents() const override
static float madd(RU_PixelFunction *pf, float val, int comp)
bool needAllComponents() const override
void getPixelShader(UT_String &frag_shader) override
RUPixelFunc getPixelFunction() const override
RU_HSVConvertOp myHSVOp
std::string lower(string_view a)
Return an all-upper case version of a (locale-independent).
Definition: strutil.h:395
RU_AtanFunc(float scale)
bool needAllComponents() const override
static float add(RU_PixelFunction *pf, float val, int)
RU_LimitFunc(bool lower, float lval, bool upper, float uval, bool clamp)
GLuint GLfloat * val
Definition: glcorearb.h:1608
RUPixelFunc getPixelFunction() const override
RU_InvertFunc(bool rep, float v)
GA_API const UT_StringHolder pivot
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
RUVectorFunc getVectorFunction() const override
RU_MultFunc(float fact)
bool eachComponentDifferent() const override
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
Definition: core.h:1131
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLboolean r
Definition: glcorearb.h:1222
void(* RUVectorFunc)(RU_PixelFunction *, float **, const bool *)
bool needAllComponents() const override
RUPixelFunc getPixelFunction() const override
RU_AddFunc(float addend)
RUPixelFunc getPixelFunction() const override
RUVectorFunc getVectorFunction() const override
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
Definition: ImathBoxAlgo.h:29
virtual void getPixelShader(UT_String &frag_shader)
RUPixelFunc getPixelFunction() const override
RUPixelFunc getPixelFunction() const override
float(* RUPixelFunc)(RU_PixelFunction *, float, int)
bool needAllComponents() const override
RUVectorFunc getVectorFunction() const override
RUPixelFunc getPixelFunction() const override
RU_TanFunc(float scale, bool rep, float v)
RUPixelFunc getPixelFunction() const override
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept
bool eachComponentDifferent() const override
RUVectorFunc getVectorFunction() const override
bool needAllComponents() const override
RUPixelFunc getPixelFunction() const override
RU_RaiseFunc(float base)