Tools::TransferFunction::DisplayColor Class Reference

#include <displaycolor.h>

List of all members.


Detailed Description

Display a color palette, a unit box is drawn with different colors. With a mouse position (normalized with the box) it is possible to query what color has been selected.

displaycolor.png

This can be used as a color selector in a transfer function editor.

To draw the colors, this model is used:

	 *      ---------------------- white (1,1,1)
	 *      |                    |
	 *      |                    |
	 *      R      G      B      R
	 *      |------|------|------|
	 *    (100)  (010)  (001)  (100)
	 *      |                    |
	 *      |                    |
	 *      ---------------------- black (0,0,0)
	 * 

Internally, a 128x128 texture is created.

See also:
TransferFunction

Public Member Functions

 DisplayColor ()
 ~DisplayColor ()
void display () const
void getRGB (float x, float y, float &r, float &g, float &b) const
void mark (float r, float g, float b)

Constructor & Destructor Documentation

Tools::TransferFunction::DisplayColor::DisplayColor (  ) 

Tools::TransferFunction::DisplayColor::~DisplayColor (  ) 


Member Function Documentation

void Tools::TransferFunction::DisplayColor::display (  )  const

display the colors in a centered 1x1 square

void Tools::TransferFunction::DisplayColor::getRGB ( float  x,
float  y,
float &  r,
float &  g,
float &  b 
) const

get rgb for a normalized position (0..1)

Parameters:
x,y (in) mouse position normalized with the box size (0..1)
r,g,b (out) color selected at position x,y

void Tools::TransferFunction::DisplayColor::mark ( float  r,
float  g,
float  b 
)

place a cursor at color rgb


The documentation for this class was generated from the following file:

Generated on Tue Aug 4 17:57:43 2009 for libvd by  doxygen 1.5.5