VHTK::SampledFunction Class Reference
[Volumetric Data Nodes]

Inheritance diagram for VHTK::SampledFunction:

Inheritance graph
[legend]

List of all members.


Detailed Description

A sampled transfer function implementation.

The function is specified through a set of sample values that are evenly distributed throughout the specified domain. Thus the samples [ Y0, Y1, Y2, Y3 ] in the example shown in the figure are evenly distributed over the X values between (and including) rangeMin and rangeMax. Input values over and under rangeMax and rangeMin are mapped to the last and first sample, respectively.

tf_sampled.png

X3D Interface

 NameTypeDefault valueDescription
samples MFFloat   []    
interpolated SFBool   TRUE    
rangeMin SFFloat   0.0    
rangeMax SFFloat   1.0    
scale SFFloat   1.0    
 
Derived from VHTKTransferFunctionNode  
input SFFloat   0.0   The input to convert using this transfer function.  
outputValue (SFFloat)   0.0   This field converts the input value to a output value according to the specifications for the transfer function.  
outputDerivative (SFFloat)   0.0   This field evaluates the derivative of the transfer function at the position of the input value.  

Public Member Functions

 SampledFunction ()
 Initializes local members.
 SampledFunction (H3D::H3DFloat y1, H3D::H3DFloat y2)
 Initializes local members with one segment.
H3D::H3DFloat get (H3D::H3DFloat x)
 Get the value as float.
H3D::H3DFloat getDerivative (H3D::H3DFloat x)
 Get the derivative.

Public Attributes

auto_ptr
< H3D::ThreadSafeSField
< H3D::SFBool > > 
interpolated
auto_ptr
< H3D::ThreadSafeMField
< H3D::MFFloat > > 
samples
auto_ptr
< H3D::ThreadSafeSField
< H3D::SFFloat > > 
rangeMin
auto_ptr
< H3D::ThreadSafeSField
< H3D::SFFloat > > 
rangeMax
auto_ptr
< H3D::ThreadSafeSField
< H3D::SFFloat > > 
scale

Static Public Attributes

static H3D::H3DNodeDatabase database


Constructor & Destructor Documentation

VHTK::SampledFunction::SampledFunction (  ) 

Initializes local members.

VHTK::SampledFunction::SampledFunction ( H3D::H3DFloat  y1,
H3D::H3DFloat  y2 
)

Initializes local members with one segment.


Member Function Documentation

H3D::H3DFloat VHTK::SampledFunction::get ( H3D::H3DFloat  x  )  [virtual]

Get the value as float.

Implements VHTK::VHTKTransferFunctionNode.

H3D::H3DFloat VHTK::SampledFunction::getDerivative ( H3D::H3DFloat  x  )  [virtual]

Get the derivative.

Reimplemented from VHTK::VHTKTransferFunctionNode.


Generated on Thu Mar 5 08:46:57 2009 for Volume Haptics Toolkit by  doxygen 1.5.6