Blender V5.3
colorband.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "MEM_guardedalloc.h"
10
11#include "BLI_heap.hh"
12#include "BLI_math_color_c.hh"
13#include "BLI_math_vector_c.hh"
14#include "BLI_utildefines.hh"
15
16#include "DNA_key_types.h"
17#include "DNA_texture_types.h"
18
19#include "BKE_colorband.hh"
20#include "BKE_idtype.hh"
21#include "BKE_key.hh"
22
23namespace blender {
24
25void BKE_colorband_init(ColorBand *coba, bool rangetype)
26{
27 int a;
28
29 coba->data[0].pos = 0.0;
30 coba->data[1].pos = 1.0;
31
32 if (rangetype == 0) {
33 coba->data[0].r = 0.0;
34 coba->data[0].g = 0.0;
35 coba->data[0].b = 0.0;
36 coba->data[0].a = 0.0;
37
38 coba->data[1].r = 1.0;
39 coba->data[1].g = 1.0;
40 coba->data[1].b = 1.0;
41 coba->data[1].a = 1.0;
42 }
43 else {
44 coba->data[0].r = 0.0;
45 coba->data[0].g = 0.0;
46 coba->data[0].b = 0.0;
47 coba->data[0].a = 1.0;
48
49 coba->data[1].r = 1.0;
50 coba->data[1].g = 1.0;
51 coba->data[1].b = 1.0;
52 coba->data[1].a = 1.0;
53 }
54
55 for (a = 2; a < MAXCOLORBAND; a++) {
56 coba->data[a].r = 0.5;
57 coba->data[a].g = 0.5;
58 coba->data[a].b = 0.5;
59 coba->data[a].a = 1.0;
60 coba->data[a].pos = 0.5;
61 }
62
63 coba->tot = 2;
64 coba->cur = 0;
67}
68
70 const float (*array)[4],
71 const int array_len)
72{
73 /* No Re-sample, just de-duplicate. */
74 const float eps = (1.0f / 255.0f) + 1e-6f;
75 BLI_assert(array_len < MAXCOLORBAND);
76 int stops = min_ii(MAXCOLORBAND, array_len);
77 if (stops) {
78 const float step_size = 1.0f / float(max_ii(stops - 1, 1));
79 int i_curr = -1;
80 for (int i_step = 0; i_step < stops; i_step++) {
81 if ((i_curr != -1) && compare_v4v4(&coba->data[i_curr].r, array[i_step], eps)) {
82 continue;
83 }
84 i_curr += 1;
85 copy_v4_v4(&coba->data[i_curr].r, array[i_step]);
86 coba->data[i_curr].pos = i_step * step_size;
87 coba->data[i_curr].cur = i_curr;
88 }
89 coba->tot = i_curr + 1;
90 coba->cur = 0;
91 }
92 else {
93 /* coba is empty, set 1 black stop */
94 zero_v3(&coba->data[0].r);
95 coba->data[0].a = 1.0f;
96 coba->cur = 0;
97 coba->tot = 1;
98 }
99}
100
101/* -------------------------------------------------------------------- */
106
116
121{
122 if (c->next == nullptr || c->prev == nullptr) {
123 return -1.0f;
124 }
125 float area = 0.0f;
126#if 0
127 float xy_prev[2], xy_curr[2], xy_next[2];
128 xy_prev[0] = c->prev->pos;
129 xy_curr[0] = c->pos;
130 xy_next[0] = c->next->pos;
131 for (int i = 0; i < 4; i++) {
132 xy_prev[1] = c->prev->rgba[i];
133 xy_curr[1] = c->rgba[i];
134 xy_next[1] = c->next->rgba[i];
135 area += fabsf(cross_tri_v2(xy_prev, xy_curr, xy_next));
136 }
137#else
138 /* Above logic, optimized (p: previous, c: current, n: next). */
139 const float xpc = c->prev->pos - c->pos;
140 const float xnc = c->next->pos - c->pos;
141 for (int i = 0; i < 4; i++) {
142 const float ycn = c->rgba[i] - c->next->rgba[i];
143 const float ypc = c->prev->rgba[i] - c->rgba[i];
144 area += fabsf((xpc * ycn) + (ypc * xnc));
145 }
146#endif
147 return area;
148}
149
150/* TODO(@ideasman42): create `BLI_math_filter` ? */
151static float filter_gauss(float x)
152{
153 const float gaussfac = 1.6f;
154 const float two_gaussfac2 = 2.0f * gaussfac * gaussfac;
155 x *= 3.0f * gaussfac;
156 return 1.0f / sqrtf(float(M_PI) * two_gaussfac2) * expf(-x * x / two_gaussfac2);
157}
158
160 const float (*array)[4],
161 const int array_len,
162 bool filter_samples)
163{
164 BLI_assert(array_len >= 2);
165 const float eps_2x = ((1.0f / 255.0f) + 1e-6f);
167 *carr = MEM_new_array_uninitialized<ColorResampleElem>(size_t(array_len), __func__);
168 int carr_len = array_len;
169 c = carr;
170 {
171 const float step_size = 1.0f / float(array_len - 1);
172 for (int i = 0; i < array_len; i++, c++) {
173 copy_v4_v4(carr[i].rgba, array[i]);
174 c->next = c + 1;
175 c->prev = c - 1;
176 c->pos = i * step_size;
177 }
178 }
179 carr[0].prev = nullptr;
180 carr[array_len - 1].next = nullptr;
181
182 /* -2 to remove endpoints. */
183 Heap *heap = BLI_heap_new_ex(array_len - 2);
184 c = carr;
185 for (int i = 0; i < array_len; i++, c++) {
186 float cost = color_sample_remove_cost(c);
187 if (cost != -1.0f) {
188 c->node = BLI_heap_insert(heap, cost, c);
189 }
190 else {
191 c->node = nullptr;
192 }
193 }
194
195 while ((carr_len > 1 && !BLI_heap_is_empty(heap)) &&
196 ((carr_len >= MAXCOLORBAND) || (BLI_heap_top_value(heap) <= eps_2x)))
197 {
198 c = static_cast<ColorResampleElem *>(BLI_heap_pop_min(heap));
199 ColorResampleElem *c_next = c->next, *c_prev = c->prev;
200 c_prev->next = c_next;
201 c_next->prev = c_prev;
202 /* Clear data (not essential, avoid confusion). */
203 c->prev = c->next = nullptr;
204 c->node = nullptr;
205
206 /* Update adjacent */
207 for (int i = 0; i < 2; i++) {
208 ColorResampleElem *c_other = i ? c_next : c_prev;
209 if (c_other->node != nullptr) {
210 const float cost = color_sample_remove_cost(c_other);
211 if (cost != -1.0) {
212 BLI_heap_node_value_update(heap, c_other->node, cost);
213 }
214 else {
215 BLI_heap_remove(heap, c_other->node);
216 c_other->node = nullptr;
217 }
218 }
219 }
220 carr_len -= 1;
221 }
222 BLI_heap_free(heap, nullptr);
223
224 /* First member is never removed. */
225 int i = 0;
226 BLI_assert(carr_len < MAXCOLORBAND);
227 if (filter_samples == false) {
228 for (c = carr; c != nullptr; c = c->next, i++) {
229 copy_v4_v4(&coba->data[i].r, c->rgba);
230 coba->data[i].pos = c->pos;
231 coba->data[i].cur = i;
232 }
233 }
234 else {
235 for (c = carr; c != nullptr; c = c->next, i++) {
236 const int steps_prev = c->prev ? (c - c->prev) - 1 : 0;
237 const int steps_next = c->next ? (c->next - c) - 1 : 0;
238 if (steps_prev == 0 && steps_next == 0) {
239 copy_v4_v4(&coba->data[i].r, c->rgba);
240 }
241 else {
242 float rgba[4];
243 float rgba_accum = 1;
244 copy_v4_v4(rgba, c->rgba);
245
246 if (steps_prev) {
247 const float step_size = 1.0 / float(steps_prev + 1);
248 int j = steps_prev;
249 for (ColorResampleElem *c_other = c - 1; c_other != c->prev; c_other--, j--) {
250 const float step_pos = float(j) * step_size;
251 BLI_assert(step_pos > 0.0f && step_pos < 1.0f);
252 const float f = filter_gauss(step_pos);
253 madd_v4_v4fl(rgba, c_other->rgba, f);
254 rgba_accum += f;
255 }
256 }
257 if (steps_next) {
258 const float step_size = 1.0 / float(steps_next + 1);
259 int j = steps_next;
260 for (ColorResampleElem *c_other = c + 1; c_other != c->next; c_other++, j--) {
261 const float step_pos = float(j) * step_size;
262 BLI_assert(step_pos > 0.0f && step_pos < 1.0f);
263 const float f = filter_gauss(step_pos);
264 madd_v4_v4fl(rgba, c_other->rgba, f);
265 rgba_accum += f;
266 }
267 }
268
269 mul_v4_v4fl(&coba->data[i].r, rgba, 1.0f / rgba_accum);
270 }
271 coba->data[i].pos = c->pos;
272 coba->data[i].cur = i;
273 }
274 }
275 BLI_assert(i == carr_len);
276 coba->tot = i;
277 coba->cur = 0;
278
279 MEM_delete(carr);
280}
281
283 const float (*array)[4],
284 const int array_len,
285 bool filter_samples)
286{
287 /* NOTE: we could use MAXCOLORBAND here, but results of re-sampling are nicer,
288 * avoid different behavior when limit is hit. */
289 if (array_len < 2) {
290 /* No Re-sample, just de-duplicate. */
292 }
293 else {
294 /* Re-sample */
295 colorband_init_from_table_rgba_resample(coba, array, array_len, filter_samples);
296 }
297}
298
300
302{
303 ColorBand *coba;
304
305 coba = MEM_new<ColorBand>("colorband");
306 BKE_colorband_init(coba, rangetype);
307
308 return coba;
309}
310
311/* ------------------------------------------------------------------------- */
312
314 const int ipotype_hue, const float mfac, const float fac, float h1, float h2)
315{
316 float h_interp;
317 int mode = 0;
318
319#define HUE_INTERP(h_a, h_b) ((mfac * (h_a)) + (fac * (h_b)))
320#define HUE_MOD(h) (((h) < 1.0f) ? (h) : (h) - 1.0f)
321
322 h1 = HUE_MOD(h1);
323 h2 = HUE_MOD(h2);
324
325 BLI_assert(h1 >= 0.0f && h1 < 1.0f);
326 BLI_assert(h2 >= 0.0f && h2 < 1.0f);
327
328 switch (ipotype_hue) {
329 case COLBAND_HUE_NEAR: {
330 if ((h1 < h2) && (h2 - h1) > +0.5f) {
331 mode = 1;
332 }
333 else if ((h1 > h2) && (h2 - h1) < -0.5f) {
334 mode = 2;
335 }
336 else {
337 mode = 0;
338 }
339 break;
340 }
341 case COLBAND_HUE_FAR: {
342 /* Do full loop in Hue space in case both stops are the same... */
343 if (h1 == h2) {
344 mode = 1;
345 }
346 else if ((h1 < h2) && (h2 - h1) < +0.5f) {
347 mode = 1;
348 }
349 else if ((h1 > h2) && (h2 - h1) > -0.5f) {
350 mode = 2;
351 }
352 else {
353 mode = 0;
354 }
355 break;
356 }
357 case COLBAND_HUE_CCW: {
358 if (h1 > h2) {
359 mode = 2;
360 }
361 else {
362 mode = 0;
363 }
364 break;
365 }
366 case COLBAND_HUE_CW: {
367 if (h1 < h2) {
368 mode = 1;
369 }
370 else {
371 mode = 0;
372 }
373 break;
374 }
375 }
376
377 switch (mode) {
378 case 0:
379 h_interp = HUE_INTERP(h1, h2);
380 break;
381 case 1:
382 h_interp = HUE_INTERP(h1 + 1.0f, h2);
383 h_interp = HUE_MOD(h_interp);
384 break;
385 case 2:
386 h_interp = HUE_INTERP(h1, h2 + 1.0f);
387 h_interp = HUE_MOD(h_interp);
388 break;
389 }
390
391 BLI_assert(h_interp >= 0.0f && h_interp < 1.0f);
392
393#undef HUE_INTERP
394#undef HUE_MOD
395
396 return h_interp;
397}
398
399bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
400{
401 const CBData *cbd1, *cbd2, *cbd0, *cbd3;
402 float fac;
403 int ipotype;
404 int a;
405
406 if (coba == nullptr || coba->tot == 0) {
407 return false;
408 }
409
410 cbd1 = coba->data;
411
412 /* NOTE: when ipotype >= COLBAND_INTERP_B_SPLINE,
413 * we cannot do early-out with a constant color before first color stop and after last one,
414 * because interpolation starts before and ends after those... */
415 ipotype = (coba->color_mode == COLBAND_BLEND_RGB) ? coba->ipotype : int(COLBAND_INTERP_LINEAR);
416
417 if (coba->tot == 1) {
418 out[0] = cbd1->r;
419 out[1] = cbd1->g;
420 out[2] = cbd1->b;
421 out[3] = cbd1->a;
422 }
423 else if ((in <= cbd1->pos) &&
425 {
426 /* We are before first color stop. */
427 out[0] = cbd1->r;
428 out[1] = cbd1->g;
429 out[2] = cbd1->b;
430 out[3] = cbd1->a;
431 }
432 else {
433 CBData left, right;
434
435 /* we're looking for first pos > in */
436 for (a = 0; a < coba->tot; a++, cbd1++) {
437 if (cbd1->pos > in) {
438 break;
439 }
440 }
441
442 if (a == coba->tot) {
443 cbd2 = cbd1 - 1;
444 right = *cbd2;
445 right.pos = 1.0f;
446 cbd1 = &right;
447 }
448 else if (a == 0) {
449 left = *cbd1;
450 left.pos = 0.0f;
451 cbd2 = &left;
452 }
453 else {
454 cbd2 = cbd1 - 1;
455 }
456
457 if ((a == coba->tot) &&
459 {
460 /* We are after last color stop. */
461 out[0] = cbd2->r;
462 out[1] = cbd2->g;
463 out[2] = cbd2->b;
464 out[3] = cbd2->a;
465 }
466 else if (ipotype == COLBAND_INTERP_CONSTANT) {
467 /* constant */
468 out[0] = cbd2->r;
469 out[1] = cbd2->g;
470 out[2] = cbd2->b;
471 out[3] = cbd2->a;
472 }
473 else {
474 if (cbd2->pos != cbd1->pos) {
475 fac = (in - cbd1->pos) / (cbd2->pos - cbd1->pos);
476 }
477 else {
478 /* was setting to 0.0 in 2.56 & previous, but this
479 * is incorrect for the last element, see #26732. */
480 fac = (a != coba->tot) ? 0.0f : 1.0f;
481 }
482
484 /* Interpolate from right to left: `3 2 1 0`. */
485 float t[4];
486
487 if (a >= coba->tot - 1) {
488 cbd0 = cbd1;
489 }
490 else {
491 cbd0 = cbd1 + 1;
492 }
493 if (a < 2) {
494 cbd3 = cbd2;
495 }
496 else {
497 cbd3 = cbd2 - 1;
498 }
499
500 CLAMP(fac, 0.0f, 1.0f);
501
502 if (ipotype == COLBAND_INTERP_CARDINAL) {
504 }
505 else {
507 }
508
509 out[0] = t[3] * cbd3->r + t[2] * cbd2->r + t[1] * cbd1->r + t[0] * cbd0->r;
510 out[1] = t[3] * cbd3->g + t[2] * cbd2->g + t[1] * cbd1->g + t[0] * cbd0->g;
511 out[2] = t[3] * cbd3->b + t[2] * cbd2->b + t[1] * cbd1->b + t[0] * cbd0->b;
512 out[3] = t[3] * cbd3->a + t[2] * cbd2->a + t[1] * cbd1->a + t[0] * cbd0->a;
513 clamp_v4(out, 0.0f, 1.0f);
514 }
515 else {
516 if (ipotype == COLBAND_INTERP_EASE) {
517 const float fac2 = fac * fac;
518 fac = 3.0f * fac2 - 2.0f * fac2 * fac;
519 }
520 const float mfac = 1.0f - fac;
521
522 if (coba->color_mode == COLBAND_BLEND_HSV) [[unlikely]] {
523 float col1[3], col2[3];
524
525 rgb_to_hsv_v(&cbd1->r, col1);
526 rgb_to_hsv_v(&cbd2->r, col2);
527
528 out[0] = colorband_hue_interp(coba->ipotype_hue, mfac, fac, col1[0], col2[0]);
529 out[1] = mfac * col1[1] + fac * col2[1];
530 out[2] = mfac * col1[2] + fac * col2[2];
531 out[3] = mfac * cbd1->a + fac * cbd2->a;
532
534 }
535 else if (coba->color_mode == COLBAND_BLEND_HSL) [[unlikely]] {
536 float col1[3], col2[3];
537
538 rgb_to_hsl_v(&cbd1->r, col1);
539 rgb_to_hsl_v(&cbd2->r, col2);
540
541 out[0] = colorband_hue_interp(coba->ipotype_hue, mfac, fac, col1[0], col2[0]);
542 out[1] = mfac * col1[1] + fac * col2[1];
543 out[2] = mfac * col1[2] + fac * col2[2];
544 out[3] = mfac * cbd1->a + fac * cbd2->a;
545
547 }
548 else {
549 /* COLBAND_BLEND_RGB */
550 out[0] = mfac * cbd1->r + fac * cbd2->r;
551 out[1] = mfac * cbd1->g + fac * cbd2->g;
552 out[2] = mfac * cbd1->b + fac * cbd2->b;
553 out[3] = mfac * cbd1->a + fac * cbd2->a;
554 }
555 }
556 }
557 }
558
559 return true; /* OK */
560}
561
562void BKE_colorband_evaluate_table_rgba(const ColorBand *coba, float **array, int *size)
563{
564 int a;
565
566 *size = CM_TABLE + 1;
567 *array = MEM_new_array_zeroed<float>(4 * size_t(*size), "ColorBand");
568
569 for (a = 0; a < *size; a++) {
570 BKE_colorband_evaluate(coba, float(a) / float(CM_TABLE), &(*array)[a * 4]);
571 }
572}
573
574static int vergcband(const void *a1, const void *a2)
575{
576 const CBData *x1 = static_cast<const CBData *>(a1), *x2 = static_cast<const CBData *>(a2);
577
578 if (x1->pos > x2->pos) {
579 return 1;
580 }
581 if (x1->pos < x2->pos) {
582 return -1;
583 }
584 return 0;
585}
586
588{
589 int a;
590
591 if (coba->tot < 2) {
592 return;
593 }
594
595 for (a = 0; a < coba->tot; a++) {
596 coba->data[a].cur = a;
597 }
598
599 qsort(coba->data, coba->tot, sizeof(CBData), vergcband);
600
601 for (a = 0; a < coba->tot; a++) {
602 if (coba->data[a].cur == coba->cur) {
603 coba->cur = a;
604 break;
605 }
606 }
607}
608
610{
611 if (coba->tot == MAXCOLORBAND) {
612 return nullptr;
613 }
614
615 CBData *xnew;
616
617 xnew = &coba->data[coba->tot];
618 xnew->pos = position;
619
620 if (coba->tot != 0) {
621 BKE_colorband_evaluate(coba, position, &xnew->r);
622 }
623 else {
624 zero_v4(&xnew->r);
625 }
626
627 coba->tot++;
628 coba->cur = coba->tot - 1;
629
631
632 return coba->data + coba->cur;
633}
634
636{
637 if (coba->tot < 2) {
638 return false;
639 }
640
641 if (index < 0 || index >= coba->tot) {
642 return false;
643 }
644
645 coba->tot--;
646 for (int a = index; a < coba->tot; a++) {
647 coba->data[a] = coba->data[a + 1];
648 }
649 if (coba->cur) {
650 coba->cur--;
651 }
652 return true;
653}
654
657{
658 for (int a = 0; a < coba->tot; a++) {
659 fn.single(&coba->data[a].r);
660 }
661}
662
663} // namespace blender
#define MAXCOLORBAND
A min-heap / priority queue ADT.
#define M_PI
#define CM_TABLE
Read Blender memory allocation and freeing.
#define CLAMP(a, b, c)
#define ELEM(...)
#define HUE_INTERP(h_a, h_b)
#define HUE_MOD(h)
#define expf(x)
#define position
BMesh Iterators.
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void void bool BLI_heap_is_empty(const Heap *heap) ATTR_NONNULL(1)
Definition BLI_heap.cc:271
Heap * BLI_heap_new_ex(unsigned int reserve_num) ATTR_WARN_UNUSED_RESULT
Definition BLI_heap.cc:173
void BKE_colorband_init(ColorBand *coba, bool rangetype)
Definition colorband.cc:25
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void void BLI_heap_remove(Heap *heap, HeapNode *node) ATTR_NONNULL(1
Definition BLI_heap.cc:309
static void colorband_init_from_table_rgba_resample(ColorBand *coba, const float(*array)[4], const int array_len, bool filter_samples)
Definition colorband.cc:159
void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
MINLINE void mul_v4_v4fl(float r[4], const float a[4], float f)
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
Definition BLI_heap.cc:193
ColorBand * BKE_colorband_add(bool rangetype)
Definition colorband.cc:301
MINLINE int max_ii(int a, int b)
bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
Definition colorband.cc:399
MINLINE float cross_tri_v2(const float v1[2], const float v2[2], const float v3[2])
void * BLI_heap_pop_min(Heap *heap) ATTR_NONNULL(1)
Definition BLI_heap.cc:293
static float filter_gauss(float x)
Definition colorband.cc:151
MINLINE bool compare_v4v4(const float v1[4], const float v2[4], float limit) ATTR_WARN_UNUSED_RESULT
void BKE_colorband_foreach_working_space_color(ColorBand *coba, const IDTypeForeachColorFunctionCallback &fn)
Definition colorband.cc:655
MINLINE void zero_v4(float r[4])
void BKE_colorband_evaluate_table_rgba(const ColorBand *coba, float **array, int *size)
Definition colorband.cc:562
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
Definition math_color.cc:61
static float colorband_hue_interp(const int ipotype_hue, const float mfac, const float fac, float h1, float h2)
Definition colorband.cc:313
float BLI_heap_top_value(const Heap *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition BLI_heap.cc:286
HeapNode * BLI_heap_insert(Heap *heap, float value, void *ptr) ATTR_NONNULL(1)
Definition BLI_heap.cc:236
MINLINE void clamp_v4(float vec[4], float min, float max)
void BKE_colorband_update_sort(ColorBand *coba)
Definition colorband.cc:587
MINLINE void zero_v3(float r[3])
static int vergcband(const void *a1, const void *a2)
Definition colorband.cc:574
void hsl_to_rgb_v(const float hsl[3], float r_rgb[3])
Definition math_color.cc:66
CBData * BKE_colorband_element_add(ColorBand *coba, float position)
Definition colorband.cc:609
void BKE_colorband_init_from_table_rgba(ColorBand *coba, const float(*array)[4], int array_len, bool filter_samples)
Definition colorband.cc:282
void BLI_heap_node_value_update(Heap *heap, HeapNode *node, float value) ATTR_NONNULL(1
Definition BLI_heap.cc:324
static float color_sample_remove_cost(const ColorResampleElem *c)
Definition colorband.cc:120
bool BKE_colorband_element_remove(ColorBand *coba, int index)
Definition colorband.cc:635
MINLINE void copy_v4_v4(float r[4], const float a[4])
void key_curve_position_weights(float t, float data[4], KeyInterpolationType type)
Definition key.cc:310
static void colorband_init_from_table_rgba_simple(ColorBand *coba, const float(*array)[4], const int array_len)
Definition colorband.cc:69
MINLINE int min_ii(int a, int b)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
const btScalar eps
Definition poly34.cpp:11
#define fabsf
#define sqrtf
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eColorBand_ColorMode color_mode
eColorBand_Interp ipotype
eColorBand_HueInterp ipotype_hue
ColorResampleElem * prev
Definition colorband.cc:111
ColorResampleElem * next
Definition colorband.cc:111