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