FlowChannel Class Reference

Handles one scalar field of floats defined for each cell. More...

#include <FlowChannel.h>

Collaboration diagram for FlowChannel:
[legend]

List of all members.

Public Member Functions

 FlowChannel (FlowGeometry *g, int ts=1)
 ~FlowChannel ()
void setValue (int vtxID, float val, int timestep=0)
 sets the value of the given vertex
void copyValues (float *rawdata, int vtxSize, int offset, int timestep=0)
 takes an array containing all attributes for a vertex and copies the j-th attribute to this channel
float getValue (vec3 pos, int timestep=0) const
 returns the value at given position in data set coordinates (from 0 to dimX or dimY)
float getValue (int vtxID, int timestep=0) const
 returns the value of the given vertex
float getValueNormPos (float x, float y, int timestep=0) const
 returns the value at given position in normalized coordinates for each dimension <0..1>
float normalizeValue (float val) const
 scales the value according to the channel minimim and maximum, so that it lies inside of <0,1>
float getMin () const
 returns the minimum value found in the channel
float getMax () const
 returns the maximum value found in the channel
float getRange () const
 returns the range = max - min
FlowGeometrygetFlowGeometry () const
int getTimesteps () const
TransferFunctiongetTF () const

Private Attributes

FlowGeometrygeom
 reference to the geometry structure
float * values
 channel data storage
float minimum
 minimum value (of all cells in a single time step)
float maximum
 maximum value (of all cells in a single time step)
int m_timesteps
TransferFunctionm_tf


Detailed Description

Handles one scalar field of floats defined for each cell.

Constructor & Destructor Documentation

FlowChannel::FlowChannel ( FlowGeometry g,
int  ts = 1 
)

FlowChannel::~FlowChannel (  ) 


Member Function Documentation

void FlowChannel::copyValues ( float *  rawdata,
int  vtxSize,
int  offset,
int  timestep = 0 
)

takes an array containing all attributes for a vertex and copies the j-th attribute to this channel

Takes an array containing all attributes for a vertex and copies the attribute specified in offset to this channel in the slot for timestep ts

Parameters:
rawdata data gained directly from the file, without any processing. It contains all channels for all cells. Please note, there is no time information considered here.
vtxSize number of channels per cell (incl. velocity vector size)
offset offset of the parameter loaded into this channel
timestep the timestep the values belong to

FlowGeometry * FlowChannel::getFlowGeometry (  )  const

float FlowChannel::getMax (  )  const

returns the maximum value found in the channel

float FlowChannel::getMin (  )  const

returns the minimum value found in the channel

float FlowChannel::getRange (  )  const

returns the range = max - min

TransferFunction * FlowChannel::getTF (  )  const

int FlowChannel::getTimesteps (  )  const

float FlowChannel::getValue ( int  vtxID,
int  timestep = 0 
) const

returns the value of the given vertex

float FlowChannel::getValue ( vec3  pos,
int  timestep = 0 
) const

returns the value at given position in data set coordinates (from 0 to dimX or dimY)

float FlowChannel::getValueNormPos ( float  x,
float  y,
int  timestep = 0 
) const

returns the value at given position in normalized coordinates for each dimension <0..1>

float FlowChannel::normalizeValue ( float  val  )  const

scales the value according to the channel minimim and maximum, so that it lies inside of <0,1>

void FlowChannel::setValue ( int  vtxID,
float  val,
int  timestep = 0 
)

sets the value of the given vertex


Member Data Documentation

reference to the geometry structure

int FlowChannel::m_timesteps [private]

float FlowChannel::maximum [private]

maximum value (of all cells in a single time step)

float FlowChannel::minimum [private]

minimum value (of all cells in a single time step)

float* FlowChannel::values [private]

channel data storage


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

Generated on Wed Jan 21 13:33:57 2009 for InsightFlow by  doxygen 1.5.7.1