ColorMap Class Reference

List of all members.

Public Member Functions

bool Save (const char *fname)
bool Load (const char *fname)
void Add (float elev, const RGBi &color)
void RemoveAt (int num)
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< RGBim_color

Detailed Description

This small class describes how to map elevation (as from a heightfield) onto a set of colors.


Member Function Documentation

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.

Parameters:
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.


Generated on Tue Apr 22 10:10:59 2008 for vtdata library by  doxygen 1.4.5