Main Page   Compound List   File List   Compound Members  

TransferFunction.h

00001 // TransferFunction.h: Schnittstelle für die Klasse TransferFunction.
00002 //
00004 
00005 #if !defined(AFX_TRANSFERFUNCTION_H__F76E8A8E_FC5D_41BC_A53B_3DADA085B67D__INCLUDED_)
00006 #define AFX_TRANSFERFUNCTION_H__F76E8A8E_FC5D_41BC_A53B_3DADA085B67D__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 //#include "FlowVis.h"
00013 
00015 struct TransferValue
00016 {
00017     float r;                      
00018     float g;                      
00019     float b;                      
00020 };
00021 
00023 struct TransferPoint
00024 {
00025     float position;                 
00026     TransferValue value;            
00027     TransferPoint *nextPoint;       
00028 };
00029 
00030 class CFlowVisApp;
00031 
00032 class TransferFunction  
00033 {
00034 public:
00035         void setRange(float min, float max);
00036     int reset();
00037 
00038         TransferValue transferDensityInterpolated(float position);
00039         
00040         int loadFromFile(char *filename);
00041         int saveToFile(char *filename);
00042 
00043     int movePoint(TransferPoint *point, float position);
00044         int deletePoint(TransferPoint* delPoint);
00045         TransferPoint* getFirstPoint();
00046         
00047         int addPoint(float position, float r, float g, float b);
00048 
00049         TransferFunction();
00050         virtual ~TransferFunction();
00051 
00052 private:
00053 
00054     CFlowVisApp* m_App;
00055         TransferPoint* prevPoint(TransferPoint* point);
00056 
00057         TransferPoint *points;
00058 
00059     float offset;
00060     float scale;
00061 };
00062 
00063 #endif // !defined(AFX_TRANSFERFUNCTION_H__F76E8A8E_FC5D_41BC_A53B_3DADA085B67D__INCLUDED_)

Generated on Wed Jan 21 13:19:24 2004 for FlowVis by doxygen1.2.18