SbTVizColorScale Class Reference
[TerrainViz]

TerrainViz Class to manage colorscales More...

#include <TerrainViz/SbTVizColorScale.h>

List of all members.

Public Types

enum  ColorMode {
  TVIZ_SHADING = 0,
  TVIZ_CONTOURING
}

Public Member Functions

 SbTVizColorScale ()
 SbTVizColorScale (const SbTVizColorScale &colorScale)
virtual ~SbTVizColorScale ()
void setColors (int numColors, const SbColor *colors)
const SbColorgetColors () const
int getNumColors () const
void setAltitudes (int numAltitudes, const float *altitudes)
const float * getAltitudes () const
int getNumAltitudes () const
void setExtremeColors (SbColor &lowerColor, SbColor &upperColor)
void getExtremeColors (SbColor &lowerColor, SbColor &upperColor) const
void getColor (float altitude, SbColor &color) const
void setColorMode (ColorMode colorMode)
ColorMode getColorMode () const

Detailed Description

TerrainViz Class to manage colorscales

This class manages a list of altitudes and a corresponding color list.

Colors are mapped onto the terrain using the altitude scale. For N colors, N+1 altitudes must be supplied. Extreme colors are mapped for data outside the given limits (high and low).

DTM_colorscale.jpg

If no colors are supplied, white is used.

Two modes are available:

SEE ALSO

SbTVizRegularGridData, SoTViz, SoTVizRender

Deprecated:

Deprecated since Open Inventor 9500
No longer supported.

Member Enumeration Documentation

Enumerator:
TVIZ_SHADING 

Colorscale is smoothed.

TVIZ_CONTOURING 

Colorscale is applied by contouring.


Constructor & Destructor Documentation

SbTVizColorScale::SbTVizColorScale (  ) 

Constructor.

SbTVizColorScale::SbTVizColorScale ( const SbTVizColorScale colorScale  ) 

Constructor by copy.

virtual SbTVizColorScale::~SbTVizColorScale (  )  [virtual]

Destructor.


Member Function Documentation

const float* SbTVizColorScale::getAltitudes (  )  const

Returns the altitude array.

void SbTVizColorScale::getColor ( float  altitude,
SbColor color 
) const

Returns the color at the specified height.

ColorMode SbTVizColorScale::getColorMode (  )  const

Returns the color mode.

const SbColor* SbTVizColorScale::getColors (  )  const

Returns the color array.

void SbTVizColorScale::getExtremeColors ( SbColor lowerColor,
SbColor upperColor 
) const

Returns the lower and upper colors used for extreme values.

int SbTVizColorScale::getNumAltitudes (  )  const

Returns the altitude array length.

int SbTVizColorScale::getNumColors (  )  const

Returns the color array length.

void SbTVizColorScale::setAltitudes ( int  numAltitudes,
const float *  altitudes 
)

Sets the altitude array.

This array should be one element longer than the colors array. The array must be sorted by increasing values.

void SbTVizColorScale::setColorMode ( ColorMode  colorMode  ) 

Sets the color mode.

void SbTVizColorScale::setColors ( int  numColors,
const SbColor colors 
)

Sets the color array.

This array should be one element shorter than the altitudes array.

void SbTVizColorScale::setExtremeColors ( SbColor lowerColor,
SbColor upperColor 
)

Sets the lower and upper colors used for the extreme low and high values.

The default upper extreme color is white, the default lower extreme color is black.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/