#include <FlowData.h>
Public Member Functions | |
FlowData () | |
initializes the channel storage | |
FlowData (Shader *_shader) | |
~FlowData () | |
destoys all created channels | |
bool | loadDataset (string filename, bool bigEndian) |
Loads a dataset, returns true if everything successful. You have to specify the byte order used in the data. | |
int | getNumTimesteps () |
Returns the number of timesteps. | |
int | getNumberOfChannels () |
Returns the number of channels in the data-file. | |
void | setMaxTextureSize (int _maxTextureSize) |
Sets the maximum texture size (for each dimension). | |
int | createChannel () |
creates a new channel and returns it's address in the channels array (line 28) | |
void | deleteChannel (int i) |
deletes the channel and all it's data at given address | |
FlowChannel * | getChannel (int i) |
returns a pointer to the instance of channel at given adress. This is the only way to access the channels storage (at line 28) | |
int | createChannelGeometry (int dimension) |
creates a new channel containing the geometrical information of the given dimension (x = 0, y = 1). Returns address of the created channel in the channels array (line 28) | |
int | createChannelVectorLength (int chX, int chY, int chZ=-1) |
creates a new channel containing the vector lengths for the given channels (channels given by IDs). Returns address of the created channel in the channels array (line 28) | |
int | createChannelVectorLength (FlowChannel *chX, FlowChannel *chY, FlowChannel *chZ=NULL) |
creates a new channel containing the vector lengths for the given channels (channels given by reference). Returns address of the created channel | |
void | createVelocityTexture (int velocityChannel) |
void | createFirstDataTexture () |
void | createSecondDataTexture () |
void | uploadFirstDataTexture () |
void | uploadSecondDataTexture () |
bool | isDataLoaded () |
float * | getVelMin () |
float * | getVelMax () |
void | draw () |
int | getDimensionX () |
returns the number of vertices in X dimension | |
int | getDimensionY () |
returns the number of vertices in Y dimension | |
int | getDimensionZ () |
returns the number of vertices in Z dimension, is always 1 | |
FlowGeometry * | getGeometry () |
FlowData () | |
initializes the channel storage | |
FlowData (Shader *_shader) | |
~FlowData () | |
destoys all created channels | |
bool | loadDataset (string filename, bool bigEndian) |
Loads a dataset, returns true if everything successful. You have to specify the byte order used in the data. | |
int | getNumTimesteps () |
Returns the number of timesteps. | |
int | getNumberOfChannels () |
Returns the number of channels in the data-file. | |
void | setMaxTextureSize (int _maxTextureSize) |
Sets the maximum texture size (for each dimension). | |
int | createChannel () |
creates a new channel and returns it's address in the channels array (line 28) | |
void | deleteChannel (int i) |
deletes the channel and all it's data at given address | |
FlowChannel * | getChannel (int i) |
returns a pointer to the instance of channel at given adress. This is the only way to access the channels storage (at line 28) | |
int | createChannelGeometry (int dimension) |
creates a new channel containing the geometrical information of the given dimension (x = 0, y = 1). Returns address of the created channel in the channels array (line 28) | |
int | createChannelVectorLength (int chX, int chY, int chZ=-1) |
creates a new channel containing the vector lengths for the given channels (channels given by IDs). Returns address of the created channel in the channels array (line 28) | |
int | createChannelVectorLength (FlowChannel *chX, FlowChannel *chY, FlowChannel *chZ=NULL) |
creates a new channel containing the vector lengths for the given channels (channels given by reference). Returns address of the created channel | |
void | createVelocityTexture (int velocityChannel) |
void | createFirstDataTexture () |
void | createSecondDataTexture () |
void | uploadFirstDataTexture () |
void | uploadSecondDataTexture () |
bool | isDataLoaded () |
float * | getVelMin () |
float * | getVelMax () |
void | draw () |
int | getDimensionX () |
returns the number of vertices in X dimension | |
int | getDimensionY () |
returns the number of vertices in Y dimension | |
int | getDimensionZ () |
returns the number of vertices in Z dimension, is always 1 | |
FlowGeometry * | getGeometry () |
Private Attributes | |
bool | loaded |
Is there any data loaded? | |
int | timesteps |
Number of timesteps. | |
int | channelCount |
int | maxTextureSize |
FlowGeometry | geometry |
Stores the underlying geometry. | |
bool | freeChannel [max_channels] |
is the channel slot free? | |
FlowChannel * | channels [max_channels] |
stores the values of data channels for one time step. For time-dependent data, the best solution is to create a separate class handling channels in one timestep and to instanciate this class for all timesteps. | |
Shader * | shader |
GLuint | velocityTex |
GLuint | geometryTex |
GLuint | firstDataTex |
GLuint | secondDataTex |
FlowData::FlowData | ( | ) |
initializes the channel storage
FlowData::FlowData | ( | Shader * | _shader | ) |
FlowData::~FlowData | ( | ) |
destoys all created channels
FlowData::FlowData | ( | ) |
initializes the channel storage
FlowData::FlowData | ( | Shader * | _shader | ) |
FlowData::~FlowData | ( | ) |
destoys all created channels
int FlowData::createChannel | ( | ) |
creates a new channel and returns it's address in the channels array (line 28)
int FlowData::createChannel | ( | ) |
creates a new channel and returns it's address in the channels array (line 28)
int FlowData::createChannelGeometry | ( | int | dimension | ) |
creates a new channel containing the geometrical information of the given dimension (x = 0, y = 1). Returns address of the created channel in the channels array (line 28)
int FlowData::createChannelGeometry | ( | int | dimension | ) |
creates a new channel containing the geometrical information of the given dimension (x = 0, y = 1). Returns address of the created channel in the channels array (line 28)
int FlowData::createChannelVectorLength | ( | FlowChannel * | chX, | |
FlowChannel * | chY, | |||
FlowChannel * | chZ = NULL | |||
) |
creates a new channel containing the vector lengths for the given channels (channels given by reference). Returns address of the created channel
int FlowData::createChannelVectorLength | ( | int | chX, | |
int | chY, | |||
int | chZ = -1 | |||
) |
creates a new channel containing the vector lengths for the given channels (channels given by IDs). Returns address of the created channel in the channels array (line 28)
int FlowData::createChannelVectorLength | ( | FlowChannel * | chX, | |
FlowChannel * | chY, | |||
FlowChannel * | chZ = NULL | |||
) |
creates a new channel containing the vector lengths for the given channels (channels given by reference). Returns address of the created channel
int FlowData::createChannelVectorLength | ( | int | chX, | |
int | chY, | |||
int | chZ = -1 | |||
) |
creates a new channel containing the vector lengths for the given channels (channels given by IDs). Returns address of the created channel in the channels array (line 28)
void FlowData::createFirstDataTexture | ( | ) |
void FlowData::createFirstDataTexture | ( | ) |
Creates a texture of the data of channel 3
void FlowData::createSecondDataTexture | ( | ) |
void FlowData::createSecondDataTexture | ( | ) |
Creates a texture of the data of channel 4
void FlowData::createVelocityTexture | ( | int | velocityChannel | ) |
void FlowData::createVelocityTexture | ( | int | velocityChannel | ) |
Creates a texture of the velocity data (R = vx, G = vy, B = vz, A = v)
void FlowData::deleteChannel | ( | int | i | ) |
deletes the channel and all it's data at given address
void FlowData::deleteChannel | ( | int | i | ) |
deletes the channel and all it's data at given address
void FlowData::draw | ( | ) |
void FlowData::draw | ( | ) |
Draws the quad on which the data is mapped.
FlowChannel* FlowData::getChannel | ( | int | i | ) |
returns a pointer to the instance of channel at given adress. This is the only way to access the channels storage (at line 28)
FlowChannel * FlowData::getChannel | ( | int | i | ) |
returns a pointer to the instance of channel at given adress. This is the only way to access the channels storage (at line 28)
int FlowData::getDimensionX | ( | ) |
returns the number of vertices in X dimension
int FlowData::getDimensionX | ( | ) |
returns the number of vertices in X dimension
Returns the dimension in x-direction
int FlowData::getDimensionY | ( | ) |
returns the number of vertices in Y dimension
int FlowData::getDimensionY | ( | ) |
returns the number of vertices in Y dimension
Returns the dimension in y-direction
int FlowData::getDimensionZ | ( | ) |
returns the number of vertices in Z dimension, is always 1
int FlowData::getDimensionZ | ( | ) |
returns the number of vertices in Z dimension, is always 1
Returns the dimension in z-direction
FlowGeometry* FlowData::getGeometry | ( | ) |
FlowGeometry * FlowData::getGeometry | ( | ) |
Returns the geometry
int FlowData::getNumberOfChannels | ( | ) |
Returns the number of channels in the data-file.
int FlowData::getNumberOfChannels | ( | ) |
Returns the number of channels in the data-file.
Returns the number of channels
int FlowData::getNumTimesteps | ( | ) |
Returns the number of timesteps.
int FlowData::getNumTimesteps | ( | ) |
Returns the number of timesteps.
float* FlowData::getVelMax | ( | ) |
float * FlowData::getVelMax | ( | ) |
Returns the maximum of the two velocityChannels (vx, vy)
float* FlowData::getVelMin | ( | ) |
float * FlowData::getVelMin | ( | ) |
Returns the minimum of the two velocityChannels (vx, vy)
bool FlowData::isDataLoaded | ( | ) |
bool FlowData::isDataLoaded | ( | ) |
Returns if data is loaded
bool FlowData::loadDataset | ( | string | filename, | |
bool | bigEndian | |||
) |
Loads a dataset, returns true if everything successful. You have to specify the byte order used in the data.
bool FlowData::loadDataset | ( | string | filename, | |
bool | bigEndian | |||
) |
Loads a dataset, returns true if everything successful. You have to specify the byte order used in the data.
void FlowData::setMaxTextureSize | ( | int | _maxTextureSize | ) |
Sets the maximum texture size (for each dimension).
void FlowData::setMaxTextureSize | ( | int | _maxTextureSize | ) |
Sets the maximum texture size (for each dimension).
Sets the maximal texture size
_maxTextureSize | Maximal texture size |
void FlowData::uploadFirstDataTexture | ( | ) |
void FlowData::uploadFirstDataTexture | ( | ) |
Uploads the first data texture (channel 3) to the shader
void FlowData::uploadSecondDataTexture | ( | ) |
void FlowData::uploadSecondDataTexture | ( | ) |
Uploads the second data texture to the shader (channel 4)
int FlowData::channelCount [private] |
FlowChannel * FlowData::channels [private] |
stores the values of data channels for one time step. For time-dependent data, the best solution is to create a separate class handling channels in one timestep and to instanciate this class for all timesteps.
GLuint FlowData::firstDataTex [private] |
bool FlowData::freeChannel [private] |
is the channel slot free?
FlowGeometry FlowData::geometry [private] |
Stores the underlying geometry.
GLuint FlowData::geometryTex [private] |
bool FlowData::loaded [private] |
Is there any data loaded?
int FlowData::maxTextureSize [private] |
GLuint FlowData::secondDataTex [private] |
Shader * FlowData::shader [private] |
int FlowData::timesteps [private] |
Number of timesteps.
GLuint FlowData::velocityTex [private] |