#include <starcolors.h>
Collaboration diagram for ColorTemperatureTable:

Public Member Functions | |
| ColorTemperatureTable (Color *_colors, unsigned int _nColors, float maxTemp) | |
| Color | lookupColor (float temp) const |
Private Attributes | |
| const Color * | colors |
| unsigned | nColors |
| float | tempScale |
|
||||||||||||||||
|
Definition at line 21 of file starcolors.h. References colors, nColors, and tempScale. 00023 : 00024 colors(_colors), 00025 nColors(_nColors), 00026 tempScale((float) (_nColors - 1) / maxTemp) 00027 {};
|
|
|
Definition at line 29 of file starcolors.h. References colors, nColors, and tempScale. Referenced by StarRenderer::process(), and Renderer::renderStar(). 00030 {
00031 unsigned int colorTableIndex = (unsigned int) (temp * tempScale);
00032 if (colorTableIndex >= nColors)
00033 return colors[nColors - 1];
00034 else
00035 return colors[colorTableIndex];
00036 }
|
|
|
Definition at line 39 of file starcolors.h. Referenced by ColorTemperatureTable(), and lookupColor(). |
|
|
Definition at line 40 of file starcolors.h. Referenced by ColorTemperatureTable(), and lookupColor(). |
|
|
Definition at line 41 of file starcolors.h. Referenced by ColorTemperatureTable(), and lookupColor(). |
1.4.1