VHTK::ColorScaleFunction Class Reference

A colour function that creates a colour scale from a specified scalar range. More...

Inheritance diagram for VHTK::ColorScaleFunction:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ColorScaleFunction (H3D::Inst< H3D::SFFloat > _input=0, H3D::Inst< GetValue > _outputValue=0, H3D::Inst< H3D::Field > _functionChanged=0, H3D::Inst< H3D::SFFloat > _rangeMin=0, H3D::Inst< H3D::SFFloat > _rangeMax=0, H3D::Inst< H3D::SFInt32 > _type=0)
 Initializes local members.
 ColorScaleFunction (float rmin, float rmax, int type=2, H3D::Inst< H3D::SFFloat > _input=0, H3D::Inst< GetValue > _outputValue=0, H3D::Inst< H3D::Field > _functionChanged=0, H3D::Inst< H3D::SFFloat > _rangeMin=0, H3D::Inst< H3D::SFFloat > _rangeMax=0, H3D::Inst< H3D::SFInt32 > _type=0)
 Initializes local members.
virtual H3D::RGB get (H3D::H3DFloat x)
 Get the value as an RGB struct.

Public Attributes

auto_ptr< H3D::SFFloatrangeMin
 The input value that should map to lowest part of the colour scale.
auto_ptr< H3D::SFFloatrangeMax
 The input value that should map to highest part of the colour scale.
auto_ptr< H3D::SFInt32type
 The type of colour scale.

Static Public Attributes

static H3D::H3DNodeDatabase database


Detailed Description

A colour function that creates a colour scale from a specified scalar range.

The scale can be inverted by specifying a max value that is smaller than the min value.

X3D Interface

 NameTypeDefault valueDescription
rangeMin SFFloat   0.0   The input value that should map to lowest part of the colour scale.  
rangeMax SFFloat   1.0   The input value that should map to highest part of the colour scale.  
type SFInt32   0   Type kind of colour scale. 0 for blue via green to red, 1 for black via red, green and blue to white, 2 for grayscale black to white.  
 
Derived from VHTKColorFunctionNode  
input SFFloat   0.0   The input to convert using this Color function.  
outputValue (SFColor)   0.0   This field converts the input value to a output value according to the specifications for the colour function.  


Constructor & Destructor Documentation

VHTK::ColorScaleFunction::ColorScaleFunction ( H3D::Inst< H3D::SFFloat _input = 0,
H3D::Inst< GetValue >  _outputValue = 0,
H3D::Inst< H3D::Field _functionChanged = 0,
H3D::Inst< H3D::SFFloat _rangeMin = 0,
H3D::Inst< H3D::SFFloat _rangeMax = 0,
H3D::Inst< H3D::SFInt32 _type = 0 
)

Initializes local members.

VHTK::ColorScaleFunction::ColorScaleFunction ( float  rmin,
float  rmax,
int  type = 2,
H3D::Inst< H3D::SFFloat _input = 0,
H3D::Inst< GetValue >  _outputValue = 0,
H3D::Inst< H3D::Field _functionChanged = 0,
H3D::Inst< H3D::SFFloat _rangeMin = 0,
H3D::Inst< H3D::SFFloat _rangeMax = 0,
H3D::Inst< H3D::SFInt32 _type = 0 
)

Initializes local members.


Member Function Documentation

virtual H3D::RGB VHTK::ColorScaleFunction::get ( H3D::H3DFloat  x  )  [virtual]

Get the value as an RGB struct.

Implements VHTK::VHTKColorFunctionNode.


Member Data Documentation

The input value that should map to highest part of the colour scale.

The input value that should map to lowest part of the colour scale.

The type of colour scale.

  • 0 Temperature scale from blue to red
  • 1 Temperature scale from black to white via blue, green and red
  • 2 Gray scale from black to white


Generated on Thu Oct 1 08:53:37 2009 for Volume Haptics Toolkit by  doxygen 1.5.8