Flow Visualization 1.0

FlowData.h

00001 #ifndef FLOATDATA_H
00002 #define FLOATDATA_H
00003 
00004 #include "FlowGeometry.h"
00005 #include "FlowChannel.h"
00006 #include <iostream>
00007 #include <string>
00008 
00009 using namespace std;
00010 
00011 //maximum number of channels. For VisLU data sets we have only 5 anyways
00012 #define max_channels 16
00013 
00015 class FlowData{
00016 private:
00018     bool loaded;
00019    
00021     int timesteps;
00022 
00024     FlowGeometry geometry;
00025     
00027     bool freeChannel[max_channels];
00029     FlowChannel* channels[max_channels];
00030 
00032     FlowData();
00033 
00034 public:
00036     ~FlowData();
00037 
00038     static FlowData* instance();
00039 
00041     bool loadDataset(string filename, bool bigEndian);
00042     
00044     int getNumTimesteps();
00045 
00047     FlowGeometry *getGeometry();
00048     
00049     //channels stuff
00051         int createChannel();
00053     void deleteChannel(int i);
00055         FlowChannel* getChannel(int i);
00056     
00057     //special channels creation
00059     int createChannelGeometry(int dimension);
00061     int createChannelVectorLength(int chX, int chY, int chZ = -1);
00063         int createChannelVectorLength(FlowChannel* chX, FlowChannel* chY, FlowChannel* chZ = NULL);
00064 };
00065 #endif