#include <FlowChannel.h>
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 | |
FlowGeometry * | getFlowGeometry () const |
int | getTimesteps () const |
TransferFunction * | getTF () const |
Private Attributes | |
FlowGeometry * | geom |
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 |
TransferFunction * | m_tf |
FlowChannel::FlowChannel | ( | FlowGeometry * | g, | |
int | ts = 1 | |||
) |
FlowChannel::~FlowChannel | ( | ) |
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
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
FlowGeometry* FlowChannel::geom [private] |
reference to the geometry structure
TransferFunction* FlowChannel::m_tf [private] |
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