Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
ColorMap Class Reference

#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< 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
tableAn empty table ready to fill with the interpolated colors.
iTableSizeThe desired number of elements in the resulting table.
fMin,fMaxThe elevation range to interpolate over.

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