58#define BU_COLOR_NULL ((struct bu_color *) 0)
63#define BU_COLOR_INIT(_c) { \
64 (_c)->buc_rgb[RED] = (_c)->buc_rgb[GRN] = (_c)->buc_rgb[BLU] = 0; (_c)->buc_rgb[ALP]; \
71#define BU_COLOR_INIT_ZERO {{0, 0, 0, 0}}
76#define BU_COLOR_CPY(_dest, _src) {\
77 (_dest)->buc_rgb[RED] = (_src)->buc_rgb[RED]; \
78 (_dest)->buc_rgb[GRN] = (_src)->buc_rgb[GRN]; \
79 (_dest)->buc_rgb[BLU] = (_src)->buc_rgb[BLU]; \
80 (_dest)->buc_rgb[ALP] = (_src)->buc_rgb[ALP]; \
154size_t bn_color_samples(
struct bu_color **samples,
const bu_color *colors,
enum sampleMethod,
size_t numSamples);
Header file for the BRL-CAD common definitions.
int bu_color_to_rgb_ints(const struct bu_color *cp, int *r, int *g, int *b)
int bu_color_from_str(struct bu_color *cp, const char *str)
int bu_color_from_rgb_floats(struct bu_color *cp, const fastf_t *rgb)
void bu_rgb_to_hsv(const unsigned char *rgb, fastf_t *hsv)
int bu_str_to_rgb(const char *str, unsigned char *rgb)
int bu_hsv_to_rgb(const fastf_t *hsv, unsigned char *rgb)
int bu_color_from_rgb_chars(struct bu_color *cp, const unsigned char *rgb)
int bu_color_rand(struct bu_color *c, bu_color_rand_t type)
int bu_color_to_rgb_chars(const struct bu_color *cp, unsigned char *rgb)
int bu_color_to_rgb_floats(const struct bu_color *cp, fastf_t *rgb)
@ BU_COLOR_RANDOM_LIGHTENED
double fastf_t
fastest 64-bit (or larger) floating point type
fastf_t hvect_t[ELEMENTS_PER_HVECT]
4-tuple vector
Global registry of recognized magic numbers.
fundamental vector, matrix, quaternion math macros