#include <HeightField.h>
Public Member Functions | |
| bool | Save (const char *fname) const |
| bool | Load (const char *fname) |
| void | Add (float elev, const RGBi &color) |
| void | RemoveAt (int num) |
| void | Clear () |
| int | Num () const |
| void | GenerateColors (std::vector< RGBi > &table, int iTableSize, float fMin, float fMax) const |
Public Attributes | |
| bool | m_bBlend |
| bool | m_bRelative |
| 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::GenerateColors | ( | std::vector< RGBi > & | table, |
| int | iTableSize, | ||
| float | fMin, | ||
| float | fMax | ||
| ) | const |
Generate an array of interpolated colors from this ColorMap.
| table | An empty table ready to fill with the interpolated colors. |
| iTableSize | The desired number of elements in the resulting table. |
| fMin,fMax | The elevation range to interpolate over. |
1.8.4