Color
[libbu (utility functions)]

Collaboration diagram for Color:


Files

file  color.c

Defines

#define ACHROMATIC   -1.0
#define HUE   0
#define SAT   1
#define VAL   2
#define RED   0
#define GRN   1
#define BLU   2

Functions

void bu_rgb_to_hsv (unsigned char *rgb, fastf_t *hsv)
int bu_hsv_to_rgb (fastf_t *hsv, unsigned char *rgb)
int bu_str_to_rgb (char *str, unsigned char *rgb)
void bu_color_of_rgb_chars (struct bu_color *cp, unsigned char *rgb)
int bu_color_to_rgb_chars (struct bu_color *cp, unsigned char *rgb)
int bu_color_of_rgb_floats (struct bu_color *cp, fastf_t *rgb)
int bu_color_to_rgb_floats (struct bu_color *cp, fastf_t *rgb)
int bu_color_of_hsv_floats (struct bu_color *cp, fastf_t *hsv)
int bu_color_to_hsv_floats (struct bu_color *cp, fastf_t *hsv)

Define Documentation

#define ACHROMATIC   -1.0
 

Definition at line 72 of file color.c.

#define HUE   0
 

Definition at line 74 of file color.c.

#define SAT   1
 

Definition at line 75 of file color.c.

#define VAL   2
 

Definition at line 76 of file color.c.

#define RED   0
 

Definition at line 78 of file color.c.

#define GRN   1
 

Definition at line 79 of file color.c.

#define BLU   2
 

Definition at line 80 of file color.c.


Function Documentation

void bu_rgb_to_hsv unsigned char *  rgb,
fastf_t hsv
 

B U _ R G B _ T O _ H S V

Definition at line 87 of file color.c.

References ACHROMATIC, BLU, GRN, HUE, RED, red, SAT, VAL, and val.

Referenced by bu_tcl_rgb_to_hsv().

int bu_hsv_to_rgb fastf_t hsv,
unsigned char *  rgb
 

B U _ H S V _ T O _ R G B

Definition at line 151 of file color.c.

References ACHROMATIC, BLU, bu_bomb(), bu_log(), GRN, HUE, RED, SAT, V3ARGS, VAL, val, VSET, and VSETALL.

Referenced by bu_tcl_hsv_to_rgb().

Here is the call graph for this function:

int bu_str_to_rgb char *  str,
unsigned char *  rgb
 

B U _ S T R _ T O _ R G B

Definition at line 210 of file color.c.

References bu_log(), num, and VSET.

Here is the call graph for this function:

void bu_color_of_rgb_chars struct bu_color cp,
unsigned char *  rgb
 

int bu_color_to_rgb_chars struct bu_color cp,
unsigned char *  rgb
 

int bu_color_of_rgb_floats struct bu_color cp,
fastf_t rgb
 

int bu_color_to_rgb_floats struct bu_color cp,
fastf_t rgb
 

int bu_color_of_hsv_floats struct bu_color cp,
fastf_t hsv
 

int bu_color_to_hsv_floats struct bu_color cp,
fastf_t hsv
 


Generated on Mon Sep 18 01:25:19 2006 for BRL-CAD by  doxygen 1.4.6