|
vtdata library
|
Public Member Functions | |
| bool | Save (const char *fname) const |
| bool | Load (const char *fname) |
| void | Add (float elev, const RGBi &color) |
| float | Elev (int index) const |
| const RGBi & | Color (int index) const |
| void | SetColor (int index, const RGBi &rgb) |
| void | RemoveAt (int num) |
| void | Clear () |
| int | Num () const |
| void | GenerateColorTable (int iTableSize, float fMin, float fMax) |
| const RGBi & | ColorFromTable (float fElev) const |
Public Attributes | |
| std::vector< RGBi > | m_table |
| float | m_fMin |
| float | m_fMax |
| float | m_fRange |
| int | m_iTableSize |
| bool | m_bBlend |
| bool | m_bRelative |
Protected Attributes | |
| std::vector< float > | m_elev |
| std::vector< RGBi > | m_color |
This small class describes how to map elevation (as from a heightfield) onto a set of colors.
| void ColorMap::Add | ( | float | elev, |
| const RGBi & | color | ||
| ) |
Add a color entry, keeping the elevation values sorted.
| void ColorMap::GenerateColorTable | ( | int | iTableSize, |
| float | fMin, | ||
| float | fMax | ||
| ) |
Tell this ColorMap to generate an internal table of interpolated colors. This sets it up to use ColorFromTable().
| iTableSize | The desired number of elements in the table. |
| fMin,fMax | The elevation range to interpolate over. |
1.8.10